+ if (!found)
+ continue;
+ }
+ if (exclude.Count > 0 || exclude_test.Count > 0) {
+ var attrs = methods [i].GetCustomAttributes (typeof (CategoryAttribute), false);
+ bool skip = false;
+ for (j = 0; j < exclude_test.Count; j++) {
+ if (name.EndsWith (exclude_test [j])) {
+ skip = true;
+ break;
+ }
+ }
+ foreach (CategoryAttribute attr in attrs) {
+ if (exclude.ContainsKey (attr.Category))
+ skip = true;
+ }
+ if (skip) {
+ if (verbose)
+ Console.WriteLine ("Skipping '{0}'.", name);
+ nskipped ++;
+ continue;
+ }
+ }
+ for (j = 5; j < name.Length; ++j)
+ if (!Char.IsDigit (name [j]))
+ break;
+ if (verbose)
+ Console.WriteLine ("Running '{0}' ...", name);
+ expected = Int32.Parse (name.Substring (5, j - 5));
+ start = DateTime.Now;
+ result = (int)methods [i].Invoke (null, null);
+ if (do_timings) {
+ end = DateTime.Now;
+ long tdiff = end.Ticks - start.Ticks;
+ int mdiff = (int)tdiff/10000;
+ tms += mdiff;
+ Console.WriteLine ("{0} took {1} ms", name, mdiff);
+ }
+ ran++;
+ if (result != expected) {
+ failed++;
+ Console.WriteLine ("{0} failed: got {1}, expected {2}", name, result, expected);