repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add test to confirm behavior of Control.SetVisibleCore, and remove some redundant...
[mcs.git]
/
tests
/
gtest-256.cs
blob
a2f17d62df3ba1daa6400e3d71376829a623a62d
1
using
System
;
2
using
System
.
Collections
.
Generic
;
3
4
public class
Test
5
{
6
public
IEnumerator
<
string
>
GetEnumerator
()
7
{
8
yield return
"TEST"
;
9
try
{
10
int
.
Parse
(
arg
);
11
}
catch
{
12
yield break
;
13
}
14
yield return
"TEST2"
;
15
}
16
17
static void
Main
()
18
{
19
new
Test
().
Run
();
20
}
21
22
string
arg
;
23
24
void
Run
()
25
{
26
int
i
=
0
;
27
foreach
(
string
s
in this
)
28
i
++;
29
if
(
i
!=
1
)
30
throw new
Exception
();
31
32
arg
=
"1"
;
33
i
=
0
;
34
foreach
(
string
s
in this
)
35
i
++;
36
if
(
i
!=
2
)
37
throw new
Exception
();
38
}
39
}
40
41