Changes required to work with mono 1.2.6 and recent unixodbc.
[schedulator.git] / wvtest.t.cs
blob371da8067b39a720ea6b899f7c47691fc23d67fd
1 #include "wvtest.cs.h"
3 using System;
4 using NUnit.Framework;
5 using Wv.Test;
7 [TestFixture]
8 public class WvTestTest
10 [Test] public void test_wvtest()
12 WVPASS(1);
13 WVPASS("hello");
14 WVPASS(new Object());
15 WVPASS(0 != 1);
17 WVFAIL(0);
18 WVFAIL("");
19 WVFAIL(null);
21 WVPASSEQ(7, 7);
22 WVPASSEQ("foo", "foo");
23 WVPASSEQ("", "");
24 Object obj = new Object();
25 WVPASSEQ(obj, obj);
26 WVPASSEQ(null, null);
28 WVPASSNE(7, 8);
29 WVPASSNE("foo", "blue");
30 WVPASSNE("", "notempty");
31 WVPASSNE(null, "");
32 WVPASSNE(obj, null);
33 WVPASSNE(obj, new Object());
34 WVPASSNE(new Object(), new Object());
37 // these are only public to get rid of the "not assigned to" warnings.
38 // we don't assign to them because that's the whole point of the test.
39 public DateTime null_date;
40 public TimeSpan null_span;
42 [Test] public void test_dates_and_spans()
44 WVPASS(null_date == DateTime.MinValue);
45 WVPASSEQ(null_date, DateTime.MinValue);
46 WVPASS(null_span == TimeSpan.Zero);
47 WVPASSEQ(null_span, TimeSpan.Zero);
49 TimeSpan t = TimeSpan.FromMinutes(60*24*7);
50 WVPASSEQ(t.ToString(), "7.00:00:00");
51 WVPASSEQ(t.Ticks, 7*24*60*60*10000000L);
52 WVPASS(t.TotalMinutes == 7*24*60);
53 WVPASSEQ(t.TotalMinutes, 7*24*60);
54 WVPASSEQ(t.TotalSeconds, 7*24*60*60);
55 WVPASSEQ(t.Minutes, 0);