xbuild: fix style in test
authorAndres G. Aragoneses <knocte@gmail.com>
Mon, 3 Sep 2012 10:38:39 +0000 (11:38 +0100)
committerAndres G. Aragoneses <knocte@gmail.com>
Mon, 3 Sep 2012 10:38:39 +0000 (11:38 +0100)
Pointed out by Ankit.

mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs

index a6030052d12e4bc2c8fdc7701c8e3ca5fb42e858..9f70f291f117497844b987337391dc2837827e6a 100644 (file)
@@ -192,12 +192,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                        IEnumerator e = target.GetEnumerator ();
 
                        bool thrown = false;
-                       try
-                       {
+                       try {
                                var name = ((BuildTask)e.Current).Name;
-                       }
-                       catch (InvalidOperationException) // "Enumeration has not started. Call MoveNext"
-                       {
+                       } catch (InvalidOperationException) { // "Enumeration has not started. Call MoveNext"
                                thrown = true;
                        }
                        if (!thrown)
@@ -207,12 +204,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
                        Assert.AreEqual (true, e.MoveNext (), "A5");
                        Assert.AreEqual ("Message", ((BuildTask)e.Current).Name, "A6");
                        Assert.AreEqual (false, e.MoveNext (), "A7");
-                       try
-                       {
+                       try {
                                var name = ((BuildTask) e.Current).Name;
-                       }
-                       catch (InvalidOperationException) //"Enumeration already finished."
-                       {
+                       } catch (InvalidOperationException) { //"Enumeration already finished."
                                return;
                        }
                        Assert.Fail ("A8: Should have thrown IOE, because there's only one buidTask");