Changes required to work with mono 1.2.6 and recent unixodbc.
[schedulator.git] / wvutils.t.cs
blobf3eb0b144ea1d2ed5fcddb8014edc5535026b6ec
1 #include "wvtest.cs.h"
3 using System;
4 using System.Collections;
5 using NUnit.Framework;
6 using Wv.Test;
7 using Wv.Utils;
9 [TestFixture]
10 public class WvTests
12 [Test] [Category("shift")] public void shift_test()
14 string[] x = {"a", null, "c", "", "e", "f"};
16 WVPASSEQ(wv.shift(ref x, 0), "a");
17 WVPASSEQ(wv.shift(ref x, 0), null);
18 WVPASSEQ(wv.shift(ref x, 1), "");
19 WVPASSEQ(wv.shift(ref x, 2), "f");
20 WVPASSEQ(x.Length, 2);
21 WVPASSEQ(wv.shift(ref x, 0), "c");
22 WVPASSEQ(wv.shift(ref x, 0), "e");
23 WVPASSEQ(x.Length, 0);
26 [Test] [Category("ini")] public void ini_test()
28 Ini ini = new Ini("test.ini");
29 WVPASSEQ(ini[""].Count, 2);
30 WVPASSEQ(ini[""]["global item"], "i");
31 WVPASSEQ(ini[""]["global 2"], "i2");
32 WVPASSEQ(ini["subsEction"].Count, 3);
33 WVPASSEQ(ini["subseCtion"]["2"], "3");
34 WVPASSEQ(ini["nonexistent"].Count, 0);