[tests] Rework TypeBuilderTest SetUp/TearDown
commit5c066508855641df3296159d9dd3f1d9d355c13a
authorAleksey Kliger <aleksey@xamarin.com>
Fri, 16 Jun 2017 23:51:27 +0000 (16 19:51 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Fri, 16 Jun 2017 23:58:27 +0000 (16 19:58 -0400)
tree67338d9640412aab4b9285749bc7fa2dc593e788
parentd4bd4f00917bd9acac1f7c801ae04be53a73b4d1
[tests] Rework TypeBuilderTest SetUp/TearDown

- Create a unique temporary directory for each test in TypeBuilderTest and delete
  it on TearDown.

- Change tests to use tempDir instead of Path.GetTempPath ()

- Change IsSerializable () test to how it was 11 years ago and have it write to a
  file with a simple name (but now in a directory where noone else is writing)

- Change FieldsWithSameName (), FieldsWithSameNameAndType () and
  MethodsWithSameNameAndSig () to use the default temp assembly (now in a
  unique tempDir) instead of using the CreateTempAssembly ()

- Remove CreateTempAssembly function. It is dead code.
mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs