X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem%2FGuidTest.cs;h=463d54a9b5e65b398b76a83dba112c9a830d7f7c;hb=cf7319008babd6a0bb0365331d6be575ff23aaa1;hp=945a4084e091284fccaea6ec8162ebc346cd72fd;hpb=51927cb4192e9ab4ef42cfad8b8be638c0e615c8;p=mono.git diff --git a/mcs/class/corlib/Test/System/GuidTest.cs b/mcs/class/corlib/Test/System/GuidTest.cs index 945a4084e09..463d54a9b5e 100644 --- a/mcs/class/corlib/Test/System/GuidTest.cs +++ b/mcs/class/corlib/Test/System/GuidTest.cs @@ -54,6 +54,7 @@ namespace MonoTests.System { Guid g3 = new Guid ("{0x00010203,0x0405,0x0607,{0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}}"); Guid g4 = new Guid ("(00010203-0405-0607-0809-0A0B0C0D0E0F)"); Guid g5 = new Guid ("\n \r \n 00010203-0405-0607-0809-0a0b0c0d0e0f \r\n"); + Guid g6 = new Guid ("\t {\t 0x00000001 , 0x0002 , \t 0x0003 \t , { 0x04 , 0x05 , \t 0x06\t,\t0x07 , 0x08 , 0x09 , 0x0a , 0x0b } \t }\t "); string expected = "00010203-0405-0607-0809-0a0b0c0d0e0f"; Assert.AreEqual (expected, g0.ToString (), "A0"); Assert.AreEqual (expected, g1.ToString (), "A1"); @@ -61,6 +62,7 @@ namespace MonoTests.System { Assert.AreEqual (expected, g3.ToString (), "A3"); Assert.AreEqual (expected, g4.ToString (), "A4"); Assert.AreEqual (expected, g5.ToString (), "A5"); + Assert.AreEqual ("00000001-0002-0003-0405-060708090a0b", g6.ToString (), "A6"); } [Test] @@ -386,6 +388,16 @@ namespace MonoTests.System { guid = Guid.ParseExact ("{0x00010203,0x0405,0x0607,{0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}}", "X"); Assert.AreEqual (expected, guid.ToString ()); + + guid = Guid.ParseExact ("\t {\t 0x00000001 , 0x0002 , \t 0x0003 \t , { 0x04 , 0x05 , \t 0x06\t,\t0x07 , 0x08 , 0x09 , 0x0a , 0x0b } \t }\t ", "X"); + Assert.AreEqual ("00000001-0002-0003-0405-060708090a0b", guid.ToString (), "#8"); + } + + [Test] + public void Parse () + { + var guid = Guid.Parse ("\t {\t 0x00000001 , 0x0002 , \t 0x0003 \t , { 0x04 , 0x05 , \t 0x06\t,\t0x07 , 0x08 , 0x09 , 0x0a , 0x0b } \t }\t "); + Assert.AreEqual ("00000001-0002-0003-0405-060708090a0b", guid.ToString (), "#1"); } [Test]