* Refractored a bit.
[ngenerator.git] / Asserter.cs
blob1f538fc4b13d5c68f0fd18e77b5ddbc3953f2d47
1 // /home/jeremie/TaoParser/NGenerator/Asserter.cs
2 // Writtent by jeremie at 09:46 08/06/2007
3 //
4 // This file is licensed under the LGPL licence as described in the COPYING file
6 using System;
8 namespace NGenerator
10 public static class Asserter
12 public static void Assert(bool condition)
14 Assert(condition, string.Empty);
17 public static void Assert(bool condition, string message)
19 if (condition) return;
21 Console.ForegroundColor = ConsoleColor.DarkRed;
22 Console.WriteLine("Bad assertion (" + message + "). Result is " + condition.ToString());
23 Console.ResetColor();