[Mono-list] 10-17-01 Test suite work
Sean MacIsaac
macisaac@ximian.com
17 Oct 2001 17:07:32 -0400
--=-LDAOCmhx+clhwFFUVI4V
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello,
Work so far today:
* Fixed a couple of things in the Math class so make windows would
work.
* Fixed things so that testing could proceed in windows. To do this a
parred down version of our corlib is made (minus classes that use
internalcalls and some others).
* Moved things around in the corlib/Test directory so that they are
well organized and easy to use/extend/understand.
Attached is a diff.
Sean
--=-LDAOCmhx+clhwFFUVI4V
Content-Type: text/plain
Content-Disposition: attachment; filename=mcs.diff
Content-Transfer-Encoding: 7bit
? class/System/Test/System_test.dll
? class/System.XML/Test/System.XML_test.dll
? mcs/mcs.pdb
? tools/verifier.pdb
Index: class/corlib/corlib.build
===================================================================
RCS file: /cvs/public/mcs/class/corlib/corlib.build,v
retrieving revision 1.2
diff -u -r1.2 corlib.build
--- class/corlib/corlib.build 2001/09/26 16:08:28 1.2
+++ class/corlib/corlib.build 2001/10/17 17:17:33
@@ -20,6 +20,24 @@
<excludes name="System.Collections/Queue.cs"/>
</sources>
</csc>
+ <csc target="library" output="Test/corlib_res.dll" debug="${debug}">
+ <arg value="/nowarn:1595"/>
+ <arg value="/unsafe"/>
+ <sources>
+ <includes name="**/*.cs"/>
+ <excludes name="Test/**"/>
+ <excludes name="Linux/**"/>
+ <excludes name="System/Object.cs"/>
+ <excludes name="System/ValueType.cs"/>
+ <excludes name="System/Type.cs"/>
+ <excludes name="System/String.cs"/>
+ <excludes name="System.Reflection.Emit/**"/>
+ <excludes name="System.Reflection/**"/>
+ <excludes name="System/RuntimeTypeHandle.cs"/>
+ <excludes name="System.PAL/IOperatingSystem.cs"/>
+ <excludes name="System.Collections/Queue.cs"/>
+ </sources>
+ </csc>
<nant basedir="Test" target="build"/>
</target>
@@ -36,6 +54,7 @@
<excludes name="System.Collections/Queue.cs"/>
</sources>
</csc>
+ <copy file="../lib/corlib.dll" tofile="Test/corlib_res.dll"/>
<nant basedir="Test" target="build"/>
</target>
@@ -45,6 +64,7 @@
<target name="clean">
<delete file="../lib/corlib.dll" failonerror="false"/>
+ <delete file="Test/corlib_res.dll" failonerror="false"/>
<nant basedir="Test" target="clean"/>
</target>
</project>
Index: class/corlib/Linux/Linux.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Linux/Linux.cs,v
retrieving revision 1.3
diff -u -r1.3 Linux.cs
--- class/corlib/Linux/Linux.cs 2001/10/01 13:26:23 1.3
+++ class/corlib/Linux/Linux.cs 2001/10/17 17:17:33
@@ -557,5 +557,52 @@
return flags;
}
+
+ [ DllImport("libm", EntryPoint="acos") ]
+ public extern static double Acos(double d);
+
+ [ DllImport("libm", EntryPoint="asin") ]
+ public extern static double Asin(double d);
+
+ [ DllImport("libm", EntryPoint="atan") ]
+ public extern static double Atan(double d);
+
+ [ DllImport("libm", EntryPoint="atan2") ]
+ public extern static double Atan2(double y, double x);
+
+ [ DllImport("libm", EntryPoint="cos") ]
+ public extern static double Cos(double d);
+
+ [ DllImport("libm", EntryPoint="cosh") ]
+ public extern static double Cosh(double d);
+
+ [ DllImport("libm", EntryPoint="exp") ]
+ public extern static double Exp(double d);
+
+ [ DllImport("libm", EntryPoint="log") ]
+ public extern static double Log(double d);
+
+ [ DllImport("libm", EntryPoint="log10") ]
+ public extern static double Log10(double d);
+
+ [ DllImport("libm", EntryPoint="pow") ]
+ public extern static double Pow(double x, double y);
+
+ [ DllImport("libm", EntryPoint="sin") ]
+ public extern static double Sin(double d);
+
+ [ DllImport("libm", EntryPoint="sinh") ]
+ public extern static double Sinh(double d);
+
+ [ DllImport("libm", EntryPoint="sqrt") ]
+ public extern static double Sqrt(double d);
+
+ [ DllImport("libm", EntryPoint="tan") ]
+ public extern static double Tan(double d);
+
+ [ DllImport("libm", EntryPoint="tanh") ]
+ public extern static double Tanh(double d);
+
+
}
}
Index: class/corlib/System/Array.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System/Array.cs,v
retrieving revision 1.6
diff -u -r1.6 Array.cs
--- class/corlib/System/Array.cs 2001/10/17 03:54:00 1.6
+++ class/corlib/System/Array.cs 2001/10/17 17:17:33
@@ -13,7 +13,7 @@
namespace System
{
- public abstract class Array : ICloneable
+ public abstract class Array : ICloneable, ICollection
{
// Constructor
protected Array ()
@@ -65,6 +65,32 @@
public extern static Array CreateInstance(Type elementType, int[] lengths, int [] bounds);
// Methods Implementations
+
+ public int Count {
+ get {
+ return Length;
+ }
+ }
+
+ public bool IsSynchronized {
+ get {
+ // FIXME?
+ return false;
+ }
+ }
+
+ public object SyncRoot {
+ get {
+ // FIXME
+ return null;
+ }
+ }
+
+ public virtual IEnumerator GetEnumerator ()
+ {
+ // FIXME
+ return null;
+ }
public int GetUpperBound (int dimension)
{
Index: class/corlib/System/Math.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System/Math.cs,v
retrieving revision 1.2
diff -u -r1.2 Math.cs
--- class/corlib/System/Math.cs 2001/08/06 10:36:16 1.2
+++ class/corlib/System/Math.cs 2001/10/17 17:17:33
@@ -9,6 +9,7 @@
using System;
using System.Runtime.InteropServices;
+using System.PAL;
namespace System
{
@@ -52,35 +53,50 @@
throw new OverflowException("Value is too small.");
return (short)((value < 0)? -value: value);
}
- [ DllImport("libm", EntryPoint="acos") ]
- private extern static double _Acos(double d);
+
public static double Acos(double d)
{
if (d < -1 || d > 1) return Double.NaN;
- return Math._Acos(d);
+ return OpSys.Acos(d);
}
- [ DllImport("libm", EntryPoint="asin") ]
- private extern static double _Asin(double d);
+
public static double Asin(double d)
{
if (d < -1 || d > 1) return Double.NaN;
- return Math._Asin(d);
+ return OpSys.Asin(d);
}
- [ DllImport("libm", EntryPoint="atan") ]
- public extern static double Atan(double d);
- [ DllImport("libm", EntryPoint="atan2") ]
- public extern static double Atan2(double y, double x);
+
+ public static double Atan(double d)
+ {
+ return OpSys.Atan(d);
+ }
+
+ public static double Atan2(double y, double x)
+ {
+ return OpSys.Atan2(y, x);
+ }
+
public static double Ceiling(double a)
{
double b = (double)((long)a);
return (b < a)? b+1: b;
}
- [ DllImport("libm", EntryPoint="cos") ]
- public extern static double Cos(double d);
- [ DllImport("libm", EntryPoint="cosh") ]
- public extern static double Cosh(double value);
- [ DllImport("libm", EntryPoint="exp") ]
- public extern static double Exp(double d);
+
+ public static double Cos(double d)
+ {
+ return OpSys.Cos(d);
+ }
+
+ public static double Cosh(double value)
+ {
+ return OpSys.Cosh(value);
+ }
+
+ public static double Exp(double d)
+ {
+ return OpSys.Exp(d);
+ }
+
public static double Floor(double d) {
return (double)((long)d) ;
}
@@ -92,27 +108,25 @@
if (r != 0) return r;
return (x > 0)? 0: -0;
}
- [ DllImport("libm", EntryPoint="log") ]
- private extern static double _Log(double d);
+
public static double Log(double d)
{
if (d == 0) return Double.NegativeInfinity;
else if (d < 0) return Double.NaN;
- return Math._Log(d);
+ return OpSys.Log(d);
}
public static double Log(double a, double newBase)
{
if (a == 0) return Double.NegativeInfinity;
else if (a < 0) return Double.NaN;
- return Math._Log(a)/Math._Log(newBase);
+ return OpSys.Log(a)/OpSys.Log(newBase);
}
- [ DllImport("libm", EntryPoint="log10") ]
- private extern static double _Log10(double d);
+
public static double Log10(double d)
{
if (d == 0) return Double.NegativeInfinity;
else if (d < 0) return Double.NaN;
- return Math._Log10(d);
+ return OpSys.Log10(d);
}
public static byte Max(byte val1, byte val2)
{
@@ -202,8 +216,12 @@
{
return (val1 < val2)? val1: val2;
}
- [ DllImport("libm", EntryPoint="pow") ]
- public extern static double Pow(double x, double y);
+
+ public static double Pow(double x, double y)
+ {
+ return OpSys.Pow(x, y);
+ }
+
public static decimal Round(decimal d)
{
decimal r = (decimal)((long)d);
@@ -292,20 +310,31 @@
if (value > 0) return 1;
return (value == 0)? 0: -1;
}
- [ DllImport("libm", EntryPoint="sin") ]
- public extern static double Sin(double a);
- [ DllImport("libm", EntryPoint="sinh") ]
- public extern static double Sinh(double value);
- [ DllImport("libm", EntryPoint="sqrt") ]
- private extern static double _Sqrt(double d);
+
+ public static double Sin(double a)
+ {
+ return OpSys.Sin(a);
+ }
+
+ public static double Sinh(double value)
+ {
+ return OpSys.Sinh(value);
+ }
+
public static double Sqrt(double d)
{
if (d < 0) return Double.NaN;
- return Math._Sqrt(d);
+ return OpSys.Sqrt(d);
}
- [ DllImport("libm", EntryPoint="tan") ]
- public extern static double Tan(double a);
- [ DllImport("libm", EntryPoint="tanh") ]
- public extern static double Tanh(double value);
+
+ public static double Tan(double a)
+ {
+ return OpSys.Tan(a);
+ }
+
+ public static double Tanh(double value)
+ {
+ return OpSys.Tanh(value);
+ }
}
}
Index: class/corlib/System.IO/FileStream.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.IO/FileStream.cs,v
retrieving revision 1.4
diff -u -r1.4 FileStream.cs
--- class/corlib/System.IO/FileStream.cs 2001/09/26 09:11:28 1.4
+++ class/corlib/System.IO/FileStream.cs 2001/10/17 17:17:33
@@ -36,8 +36,8 @@
int bufferSize, bool isAsync)
{
fd = fd;
- acc = access;
- owner = ownsHandle;
+ //acc = access;
+ //owner = ownsHandle;
}
public FileStream (string name, FileMode mode)
Index: class/corlib/System.PAL/IOperatingSystem.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.PAL/IOperatingSystem.cs,v
retrieving revision 1.1
diff -u -r1.1 IOperatingSystem.cs
--- class/corlib/System.PAL/IOperatingSystem.cs 2001/09/26 09:35:13 1.1
+++ class/corlib/System.PAL/IOperatingSystem.cs 2001/10/17 17:17:33
@@ -159,5 +159,36 @@
void SetLastAccessTimeDirectory(string path, DateTime lastAccessTime);
void SetLastWriteTimeDirectory(string path, DateTime lastWriteTime);
+
+ double Acos(double d);
+
+ double Asin(double d);
+
+ double Atan(double d);
+
+ double Atan2(double y, double x);
+
+ double Cos(double d);
+
+ double Cosh(double value);
+
+ double Exp(dobule d);
+
+ double Log(double d);
+
+ double Log10(double d);
+
+ double Pow(double x, double y);
+
+ double Sin(double d);
+
+ double Sinh(double d);
+
+ double Sqrt(double d);
+
+ double Tan(double d);
+
+ double Tanh(double d);
+
}
}
Index: class/corlib/Test/corlib_test.build
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/corlib_test.build,v
retrieving revision 1.4
diff -u -r1.4 corlib_test.build
--- class/corlib/Test/corlib_test.build 2001/10/12 14:13:12 1.4
+++ class/corlib/Test/corlib_test.build 2001/10/17 17:17:33
@@ -13,18 +13,20 @@
<sources>
<includes name="**/*.cs"/>
<excludes name="System/IntegerFormatterTest.cs"/>
- <excludes name="temp/HashtableTest.cs"/>
- <excludes name="temp/QueueTest.cs"/>
+ <excludes name="System/Int64Test.cs"/>
+ <excludes name="System.Collections/QueueTest.cs"/>
<excludes name="System/IntegerFormatterTest.cs"/>
</sources>
<references basedir="..\..\..\nunit">
<includes name="NUnitCore.dll"/>
</references>
+ <arg value="/r:corlib_res.dll"/>
+ <arg value="/nowarn:1595"/>
</csc>
</target>
<target name="test" depends="build">
- <exec program="..\..\..\nunit\NUnitConsole" commandline="Ximian.Mono.Tests.AllTests,corlib_test.dll" failonerror="false"/>
+ <exec program="..\..\..\nunit\NUnitConsole" commandline="MonoTests.AllTests,corlib_test.dll" failonerror="false"/>
</target>
<target name="clean">
Index: class/corlib/Test/System/ByteTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/ByteTest.cs,v
retrieving revision 1.1
diff -u -r1.1 ByteTest.cs
--- class/corlib/Test/System/ByteTest.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/ByteTest.cs 2001/10/17 17:17:33
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class ByteTest : TestCase
{
private const Byte MyByte1 = 42;
@@ -54,7 +57,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -89,14 +92,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
Byte.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
int OverInt = Byte.MaxValue + 1;
@@ -104,7 +107,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == Byte.Parse(" $42 ", NumberStyles.Currency));
@@ -113,7 +116,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(42 == Byte.Parse(" 42 ", Nfi));
@@ -122,7 +125,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == Byte.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -131,7 +134,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -156,9 +159,10 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+}
Index: class/corlib/Test/System/DecimalTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/DecimalTest.cs,v
retrieving revision 1.1
diff -u -r1.1 DecimalTest.cs
--- class/corlib/Test/System/DecimalTest.cs 2001/10/14 18:28:54 1.1
+++ class/corlib/Test/System/DecimalTest.cs 2001/10/17 17:17:33
@@ -12,7 +12,7 @@
using System.Globalization;
using System.Runtime.CompilerServices;
-namespace Test {
+namespace MonoTests.System {
/// <summary>
/// Tests for System.Decimal
/// </summary>
@@ -613,4 +613,4 @@
}
}
-}
\ No newline at end of file
+}
Index: class/corlib/Test/System/DecimalTest2.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/DecimalTest2.cs,v
retrieving revision 1.1
diff -u -r1.1 DecimalTest2.cs
--- class/corlib/Test/System/DecimalTest2.cs 2001/10/14 18:28:54 1.1
+++ class/corlib/Test/System/DecimalTest2.cs 2001/10/17 17:17:37
@@ -11,7 +11,7 @@
using System.Globalization;
using System.Runtime.CompilerServices;
-namespace Test
+namespace MonoTests.System
{
public enum TestResultInfo
@@ -3122,4 +3122,4 @@
#endregion
}
-}
\ No newline at end of file
+}
Index: class/corlib/Test/System/Int16Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/Int16Test.cs,v
retrieving revision 1.1
diff -u -r1.1 Int16Test.cs
--- class/corlib/Test/System/Int16Test.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/Int16Test.cs 2001/10/17 17:17:37
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class Int16Test : TestCase
{
private const Int16 MyInt16_1 = -42;
@@ -59,7 +62,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -94,14 +97,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
Int16.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
int OverInt = Int16.MaxValue + 1;
@@ -109,7 +112,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == Int16.Parse(" $42 ", NumberStyles.Currency));
@@ -118,7 +121,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(-42 == Int16.Parse(" -42 ", Nfi));
@@ -127,7 +130,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == Int16.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -136,7 +139,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -161,8 +164,9 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+}
Index: class/corlib/Test/System/Int32Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/Int32Test.cs,v
retrieving revision 1.1
diff -u -r1.1 Int32Test.cs
--- class/corlib/Test/System/Int32Test.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/Int32Test.cs 2001/10/17 17:17:37
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class Int32Test : TestCase
{
private const Int32 MyInt32_1 = -42;
@@ -59,7 +62,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -94,14 +97,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
Int32.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
double OverInt = (double)Int32.MaxValue + 1;
@@ -109,7 +112,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == Int32.Parse(" $42 ", NumberStyles.Currency));
@@ -118,7 +121,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(-42 == Int32.Parse(" -42 ", Nfi));
@@ -127,7 +130,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == Int32.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -136,7 +139,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -161,8 +164,9 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+}
Index: class/corlib/Test/System/Int64Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/Int64Test.cs,v
retrieving revision 1.2
diff -u -r1.2 Int64Test.cs
--- class/corlib/Test/System/Int64Test.cs 2001/10/11 18:56:17 1.2
+++ class/corlib/Test/System/Int64Test.cs 2001/10/17 17:17:37
@@ -14,6 +14,9 @@
/// <summary>
/// Tests for System.Int64
/// </summary>
+namespace MonoTests.System
+{
+
public class Int64Test : TestCase
{
private const Int64 MyInt64_1 = -42;
@@ -98,7 +101,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -167,9 +170,9 @@
try
{
lv = Int64.Parse(sval1Test1, Nfi);
- Fail("Should raise System.FormatException 1");
+ Fail("Should raise FormatException 1");
}
- catch (System.FormatException)
+ catch (FormatException)
{
// ok
}
@@ -182,9 +185,9 @@
try
{
lv = Int64.Parse(sval1Test4, style1, Nfi);
- Fail("Should raise System.FormatException 3");
+ Fail("Should raise FormatException 3");
}
- catch (System.FormatException)
+ catch (FormatException)
{
// ok
}
@@ -201,14 +204,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
Int64.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
try {
@@ -225,7 +228,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
Assert(42 == Int64.Parse(" $42 ", NumberStyles.Currency));
try {
@@ -233,7 +236,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(-42 == Int64.Parse(" -42 ", Nfi));
@@ -242,7 +245,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == Int64.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -251,7 +254,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -284,7 +287,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -316,4 +319,4 @@
}
}
-
+}
Index: class/corlib/Test/System/SByteTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/SByteTest.cs,v
retrieving revision 1.1
diff -u -r1.1 SByteTest.cs
--- class/corlib/Test/System/SByteTest.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/SByteTest.cs 2001/10/17 17:17:37
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class SByteTest : TestCase
{
private const SByte MySByte1 = -42;
@@ -58,7 +61,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -93,14 +96,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
SByte.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
int OverInt = SByte.MaxValue + 1;
@@ -108,7 +111,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == SByte.Parse(" $42 ", NumberStyles.Currency));
@@ -117,7 +120,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(-42 == SByte.Parse(" -42 ", Nfi));
@@ -126,7 +129,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == SByte.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -135,7 +138,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -160,8 +163,9 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+}
Index: class/corlib/Test/System/StringTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/StringTest.cs,v
retrieving revision 1.2
diff -u -r1.2 StringTest.cs
--- class/corlib/Test/System/StringTest.cs 2001/10/12 14:13:12 1.2
+++ class/corlib/Test/System/StringTest.cs 2001/10/17 17:17:37
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class StringTest : TestCase
{
public StringTest (string name) : base (name) {}
@@ -68,5 +71,7 @@
Assert (String.Concat (string1, string2) == concat);
}
+
+}
}
Index: class/corlib/Test/System/UInt16Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/UInt16Test.cs,v
retrieving revision 1.1
diff -u -r1.1 UInt16Test.cs
--- class/corlib/Test/System/UInt16Test.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/UInt16Test.cs 2001/10/17 17:17:37
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class UInt16Test : TestCase
{
private const UInt16 MyUInt16_1 = 42;
@@ -55,7 +58,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -90,14 +93,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
UInt16.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
int OverInt = UInt16.MaxValue + 1;
@@ -105,7 +108,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == UInt16.Parse(" $42 ", NumberStyles.Currency));
@@ -114,7 +117,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(42 == UInt16.Parse(" 42 ", Nfi));
@@ -123,7 +126,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == UInt16.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -132,7 +135,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -157,8 +160,10 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+
+}
Index: class/corlib/Test/System/UInt32Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/UInt32Test.cs,v
retrieving revision 1.1
diff -u -r1.1 UInt32Test.cs
--- class/corlib/Test/System/UInt32Test.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/UInt32Test.cs 2001/10/17 17:17:39
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class UInt32Test : TestCase
{
private const UInt32 MyUInt32_1 = 42;
@@ -55,7 +58,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -90,14 +93,14 @@
Fail("Should raise a System.ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
UInt32.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
try {
double OverInt = (double)UInt32.MaxValue + 1;
@@ -105,7 +108,7 @@
Fail("Should raise a System.OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
Assert(42 == UInt32.Parse(" $42 ", NumberStyles.Currency));
@@ -114,7 +117,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(42 == UInt32.Parse(" 42 ", Nfi));
@@ -123,7 +126,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == UInt32.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -132,7 +135,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -157,8 +160,10 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+
+}
Index: class/corlib/Test/System/UInt64Test.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System/UInt64Test.cs,v
retrieving revision 1.1
diff -u -r1.1 UInt64Test.cs
--- class/corlib/Test/System/UInt64Test.cs 2001/10/11 18:56:17 1.1
+++ class/corlib/Test/System/UInt64Test.cs 2001/10/17 17:17:39
@@ -9,6 +9,9 @@
using System;
using System.Globalization;
+namespace MonoTests.System
+{
+
public class UInt64Test : TestCase
{
private const UInt64 MyUInt64_1 = 42;
@@ -55,7 +58,7 @@
Fail("Should raise a System.ArgumentException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentException) == e.GetType());
+ Assert(typeof(ArgumentException) == e.GetType());
}
}
@@ -87,26 +90,26 @@
Assert(MyUInt64_3 == UInt64.Parse(MyString3));
try {
UInt64.Parse(null);
- Fail("Should raise a System.ArgumentNullException");
+ Fail("Should raise a ArgumentNullException");
}
catch (Exception e) {
- Assert(typeof(System.ArgumentNullException) == e.GetType());
+ Assert(typeof(ArgumentNullException) == e.GetType());
}
try {
UInt64.Parse("not-a-number");
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style)
try {
double OverInt = (double)UInt64.MaxValue + 1;
UInt64.Parse(OverInt.ToString(), NumberStyles.Float);
- Fail("Should raise a System.OverflowException");
+ Fail("Should raise a OverflowException");
}
catch (Exception e) {
- Assert(typeof(System.OverflowException) == e.GetType());
+ Assert(typeof(OverflowException) == e.GetType());
}
try {
double OverInt = (double)UInt64.MaxValue + 1;
@@ -114,15 +117,15 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
Assert(42 == UInt64.Parse(" $42 ", NumberStyles.Currency));
try {
UInt64.Parse("$42", NumberStyles.Integer);
- Fail("Should raise a System.FormatException");
+ Fail("Should raise a FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, IFormatProvider provider)
Assert(42 == UInt64.Parse(" 42 ", Nfi));
@@ -131,7 +134,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
//test Parse(string s, NumberStyles style, IFormatProvider provider)
Assert(16 == UInt64.Parse(" 10 ", NumberStyles.HexNumber, Nfi));
@@ -140,7 +143,7 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
@@ -165,8 +168,9 @@
Fail("Should raise a System.FormatException");
}
catch (Exception e) {
- Assert(typeof(System.FormatException) == e.GetType());
+ Assert(typeof(FormatException) == e.GetType());
}
}
}
+}
Index: class/corlib/Test/System.Collections/HashtableTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System.Collections/HashtableTest.cs,v
retrieving revision 1.1
diff -u -r1.1 HashtableTest.cs
--- class/corlib/Test/System.Collections/HashtableTest.cs 2001/09/26 09:25:02 1.1
+++ class/corlib/Test/System.Collections/HashtableTest.cs 2001/10/17 17:17:39
@@ -8,43 +8,32 @@
-namespace Testsuite.System.Collections {
+namespace MonoTests.System.Collections {
/// <summary>Hashtable test.</summary>
- public class HashtableTest {
+ public class HashtableTest : TestCase {
public static ITest Suite {
get {
- TestSuite suite= new TestSuite("All Hashtable Tests");
- suite.AddTest(BasicOperationsTest.Suite);
+ TestSuite suite = new TestSuite();
+
+ suite.AddTest(new TestSuite(typeof(HashtableTest)));
+ suite.AddTest(new TestSuite(typeof(HashtableTest2)));
return suite;
}
}
- }
-
-
-
- public class BasicOperationsTest : TestCase {
protected Hashtable ht;
private static Random rnd;
- public BasicOperationsTest(String name) : base(name) {}
+ public HashtableTest(String name) : base(name) {}
protected override void SetUp() {
ht=new Hashtable();
rnd=new Random();
}
- public static ITest Suite {
- get {
- return new TestSuite(typeof(BasicOperationsTest));
- }
- }
-
-
-
private void SetDefaultData() {
ht.Clear();
ht.Add("k1","another");
@@ -147,6 +136,183 @@
Assert(nVals==ht.Count);
}
+
+
+ private class HashtableTest2 : TestCase {
+
+ protected Hashtable ht;
+ private static Random rnd;
+
+ public HashtableTest2 (String name) : base(name)
+ {
+ }
+
+ protected override void SetUp ()
+ {
+ ht=new Hashtable ();
+ rnd=new Random ();
+ }
+
+ public static ITest Suite
+ {
+ get {
+ return new TestSuite (typeof(HashtableTest2));
+ }
+ }
+
+ private void SetDefaultData ()
+ {
+ ht.Clear ();
+ ht.Add ("k1","another");
+ ht.Add ("k2","yet");
+ ht.Add ("k3","hashtable");
+ }
+
+
+ public void TestAddRemoveClear ()
+ {
+ ht.Clear ();
+ Assert (ht.Count == 0);
+
+ SetDefaultData ();
+ Assert (ht.Count == 3);
+
+ bool thrown=false;
+ try {
+ ht.Add ("k2","cool");
+ } catch (ArgumentException) {thrown=true;}
+ Assert("Must throw ArgumentException!",thrown);
+
+ ht["k2"]="cool";
+ Assert(ht.Count == 3);
+ Assert(ht["k2"].Equals("cool"));
+
+ }
+
+ public void TestCopyTo ()
+ {
+ SetDefaultData ();
+ Object[] entries=new Object[ht.Count];
+ ht.CopyTo (entries,0);
+ Assert("Not an entry.",entries[0] is DictionaryEntry);
+ }
+
+
+ public void TestUnderHeavyLoad ()
+ {
+ Console.WriteLine ("Testing "+ht);
+ ht.Clear ();
+
+ int max=100000;
+ String[] cache=new String[max*2];
+ int n=0;
+
+ for (int i=0;i<max;i++) {
+ int id=rnd.Next()&0xFFFF;
+ String key=""+id+"-key-"+id;
+ String val="value-"+id;
+ if (ht[key]==null) {
+ ht[key]=val;
+ cache[n]=key;
+ cache[n+max]=val;
+ n++;
+ }
+ }
+
+ Assert(ht.Count==n);
+
+ for (int i=0;i<n;i++) {
+ String key=cache[i];
+ String val=ht[key] as String;
+ String err="ht[\""+key+"\"]=\""+val+
+ "\", expected \""+cache[i+max]+"\"";
+ Assert(err,val!=null && val.Equals(cache[i+max]));
+ }
+
+ int r1=(n/3);
+ int r2=r1+(n/5);
+
+ for (int i=r1;i<r2;i++) {
+ ht.Remove(cache[i]);
+ }
+
+
+ for (int i=0;i<n;i++) {
+ if (i>=r1 && i<r2) {
+ Assert(ht[cache[i]]==null);
+ } else {
+ String key=cache[i];
+ String val=ht[key] as String;
+ String err="ht[\""+key+"\"]=\""+val+
+ "\", expected \""+cache[i+max]+"\"";
+ Assert(err,val!=null && val.Equals(cache[i+max]));
+ }
+ }
+
+ ICollection keys=ht.Keys;
+ int nKeys=0;
+ foreach (Object key in keys) {
+ Assert((key as String) != null);
+ nKeys++;
+ }
+ Assert(nKeys==ht.Count);
+
+
+ ICollection vals=ht.Values;
+ int nVals=0;
+ foreach (Object val in vals) {
+ Assert((val as String) != null);
+ nVals++;
+ }
+ Assert(nVals==ht.Count);
+
+ }
+
+ /// <summary>
+ /// Test hashtable with CaseInsensitiveHashCodeProvider
+ /// and CaseInsensitive comparer.
+ /// </summary>
+ public void TestCaseInsensitive ()
+ {
+ // Not very meaningfull test, just to make
+ // sure that hcp is set properly set.
+ Hashtable ciHashtable = new Hashtable(11,1.0f,CaseInsensitiveHashCodeProvider.Default,CaseInsensitiveComparer.Default);
+ ciHashtable ["key1"] = "value";
+ ciHashtable ["key2"] = "VALUE";
+ Assert(ciHashtable ["key1"].Equals ("value"));
+ Assert(ciHashtable ["key2"].Equals ("VALUE"));
+
+ ciHashtable ["KEY1"] = "new_value";
+ Assert(ciHashtable ["key1"].Equals ("new_value"));
+
+ }
+
+
+ public void TestCopyConstructor ()
+ {
+ SetDefaultData ();
+
+ Hashtable htCopy = new Hashtable (ht);
+
+ Assert(ht.Count == htCopy.Count);
+ }
+
+
+ public void TestEnumerator ()
+ {
+ SetDefaultData ();
+
+ IEnumerator e = ht.GetEnumerator ();
+
+ while (e.MoveNext ()) {}
+
+ Assert (!e.MoveNext ());
+
+ }
+
+
+ }
+
}
}
Index: class/corlib/Test/System.Security.Cryptography/AsymmetricAlgorithmTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System.Security.Cryptography/AsymmetricAlgorithmTest.cs,v
retrieving revision 1.1
diff -u -r1.1 AsymmetricAlgorithmTest.cs
--- class/corlib/Test/System.Security.Cryptography/AsymmetricAlgorithmTest.cs 2001/10/10 17:26:22 1.1
+++ class/corlib/Test/System.Security.Cryptography/AsymmetricAlgorithmTest.cs 2001/10/17 17:17:39
@@ -11,7 +11,7 @@
using NUnit.Framework;
-namespace Testsuite.System.Security.Cryptography {
+namespace MonoTests.System.Security.Cryptography {
public class AsymmetricAlgorithmTest : TestCase {
private AsymmetricAlgorithm _algo;
Index: class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTest.cs,v
retrieving revision 1.1
diff -u -r1.1 SymmetricAlgorithmTest.cs
--- class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTest.cs 2001/10/10 17:26:22 1.1
+++ class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTest.cs 2001/10/17 17:17:39
@@ -11,7 +11,7 @@
using NUnit.Framework;
-namespace Testsuite.System.Security.Cryptography {
+namespace MonoTests.System.Security.Cryptography {
public class SymmetricAlgorithmTest : TestCase {
private SymmetricAlgorithm _algo;
Index: class/corlib/Windows/Windows.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Windows/Windows.cs,v
retrieving revision 1.1
diff -u -r1.1 Windows.cs
--- class/corlib/Windows/Windows.cs 2001/09/26 09:35:13 1.1
+++ class/corlib/Windows/Windows.cs 2001/10/17 17:17:40
@@ -691,5 +691,51 @@
}
return false;
}
+
+ [ DllImport("msvcrt", EntryPoint="acos") ]
+ public extern static double Acos(double d);
+
+ [ DllImport("msvcrt", EntryPoint="asin") ]
+ public extern static double Asin(double d);
+
+ [ DllImport("msvcrt", EntryPoint="atan") ]
+ public extern static double Atan(double d);
+
+ [ DllImport("msvcrt", EntryPoint="atan2") ]
+ public extern static double Atan2(double y, double x);
+
+ [ DllImport("msvcrt", EntryPoint="cos") ]
+ public extern static double Cos(double d);
+
+ [ DllImport("msvcrt", EntryPoint="cosh") ]
+ public extern static double Cosh(double d);
+
+ [ DllImport("msvcrt", EntryPoint="exp") ]
+ public extern static double Exp(double d);
+
+ [ DllImport("msvcrt", EntryPoint="log") ]
+ public extern static double Log(double d);
+
+ [ DllImport("msvcrt", EntryPoint="log10") ]
+ public extern static double Log10(double d);
+
+ [ DllImport("msvcrt", EntryPoint="pow") ]
+ public extern static double Pow(double x, double y);
+
+ [ DllImport("msvcrt", EntryPoint="sin") ]
+ public extern static double Sin(double d);
+
+ [ DllImport("msvcrt", EntryPoint="sinh") ]
+ public extern static double Sinh(double d);
+
+ [ DllImport("msvcrt", EntryPoint="sqrt") ]
+ public extern static double Sqrt(double d);
+
+ [ DllImport("msvcrt", EntryPoint="tan") ]
+ public extern static double Tan(double d);
+
+ [ DllImport("msvcrt", EntryPoint="tanh") ]
+ public extern static double Tanh(double d);
+
}
}
--=-LDAOCmhx+clhwFFUVI4V--