projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5210 from alexrp/profiler-runtime-settings
[mono.git]
/
mono
/
tests
/
thread-static.cs
diff --git
a/mono/tests/thread-static.cs
b/mono/tests/thread-static.cs
index 351ead353558583fdcb7163954e4dbf5ec7f373a..dd8defd763c3b9df6fac47613b67bd52defb967f 100644
(file)
--- a/
mono/tests/thread-static.cs
+++ b/
mono/tests/thread-static.cs
@@
-1,5
+1,6
@@
using System;
using System.Threading;
using System;
using System.Threading;
+using System.Reflection;
class T {
[ThreadStatic]
class T {
[ThreadStatic]
@@
-39,6
+40,16
@@
class T {
return 1;
if (tfailed)
return 2;
return 1;
if (tfailed)
return 2;
+
+ /* Test access though reflection */
+ var = 42;
+ FieldInfo fi = typeof (T).GetField ("var", BindingFlags.NonPublic|BindingFlags.Static);
+ if ((int)fi.GetValue (null) != 42)
+ return 3;
+ fi.SetValue (null, 43);
+ if (var != 43)
+ return 4;
+
return 0;
}
}
return 0;
}
}