projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve test to check array initializations from enumerations
[mono.git]
/
mcs
/
tests
/
test-165.cs
diff --git
a/mcs/tests/test-165.cs
b/mcs/tests/test-165.cs
index f6a2f48204cda1ce77f92b3a2f2fdef864124c31..6bfbfe4455998343c4624f98a8622a4906ce0ef5 100644
(file)
--- a/
mcs/tests/test-165.cs
+++ b/
mcs/tests/test-165.cs
@@
-4,6
+4,15
@@
public class Testing
{
enum Fruit { Apple, Banana, Cherry };
{
enum Fruit { Apple, Banana, Cherry };
+ static int TestEnumInit (Fruit f)
+ {
+ Fruit [] testedFruits = { f };
+
+ if (f != Fruit.Apple)
+ return 1;
+ return 0;
+ }
+
public static int Main()
{
Fruit[] pieFillings = { Fruit.Apple, Fruit.Banana, Fruit.Cherry };
public static int Main()
{
Fruit[] pieFillings = { Fruit.Apple, Fruit.Banana, Fruit.Cherry };
@@
-15,6
+24,9
@@
public class Testing
if (pieFillings [2] != Fruit.Cherry)
return 3;
if (pieFillings [2] != Fruit.Cherry)
return 3;
+ if (TestEnumInit (Fruit.Apple) != 0)
+ return 4;
+
return 0;
}
}
return 0;
}
}