[Iiop-net-commits] IIOPNet/IntegrationTests/OmniORB/TestClient TestClient.cs,1.17,1.18
Brought to you by:
dullmann,
patrik_reali
From: Dominic U. <dul...@us...> - 2005-02-20 08:57:50
|
Update of /cvsroot/iiop-net/IIOPNet/IntegrationTests/OmniORB/TestClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10099/IntegrationTests/OmniORB/TestClient Modified Files: TestClient.cs Log Message: added tests for idl array Index: TestClient.cs =================================================================== RCS file: /cvsroot/iiop-net/IIOPNet/IntegrationTests/OmniORB/TestClient/TestClient.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TestClient.cs 29 Nov 2004 18:37:07 -0000 1.17 --- TestClient.cs 20 Feb 2005 08:57:40 -0000 1.18 *************** *** 431,434 **** --- 431,481 ---- } + [Test] + public void TestOneDimIdlIntArray() { + int[] arg = new int[] { 1, 2, 3, 4, 5 }; + int[] result = m_testService.EchoIntList5(arg); + Assertion.AssertEquals(arg.Length, result.Length); + for (int i = 0; i < arg.Length; i++) { + Assertion.AssertEquals(arg[i], result[i]); + } + } + + [Test] + public void TestOneDimIdlStringArray() { + string[] arg = new string[] { "1", "2", "3", "4", "5" }; + string[] result = m_testService.EchoStringList5(arg); + Assertion.AssertEquals(arg.Length, result.Length); + for (int i = 0; i < arg.Length; i++) { + Assertion.AssertEquals(arg[i], result[i]); + } + } + + [Test] + public void TestTwoDimIdlIntArray() { + int[,] arg = new int[,] { {1, 2}, {3, 4} }; + int[,] result = m_testService.EchoInt2Dim2x2(arg); + Assertion.AssertEquals(arg.GetLength(0), result.GetLength(0)); + Assertion.AssertEquals(arg.GetLength(1), result.GetLength(1)); + for (int i = 0; i < arg.GetLength(0); i++) { + for (int j = 0; j < arg.GetLength(1); j++) { + Assertion.AssertEquals(arg[i,j], result[i,j]); + } + } + } + + [Test] + public void TestStructContainingArray() { + BlobData arg = new BlobData(); + arg.ident = 1; + arg.data = new int[] { 1, 2, 3 }; + BlobData result = m_testService.EchoBlobData(arg); + Assertion.AssertEquals(arg.ident, result.ident); + Assertion.AssertEquals(arg.data.Length, result.data.Length); + for (int i = 0; i < arg.data.Length; i++) { + Assertion.AssertEquals(arg.data[i], result.data[i]); + } + } + + } |