mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
Add WarningAssert functions, print a warning if assertion fails
This commit is contained in:
parent
bb423419b1
commit
5016c29910
@ -46,6 +46,18 @@ namespace RusticiSoftware.Translator.CSharp
|
||||
Console.Out.WriteLine("{0} warning: {1}", Filename, s);
|
||||
}
|
||||
|
||||
protected void WarningAssert(bool assertion, int line, String s)
|
||||
{
|
||||
if (Cfg.Warnings && !assertion)
|
||||
Console.Out.WriteLine("{0}({1}) failed assertion: {2}", Filename, line, s);
|
||||
}
|
||||
|
||||
protected void WarningAssert(bool assertion, String s)
|
||||
{
|
||||
if (Cfg.Warnings && !assertion)
|
||||
Console.Out.WriteLine("{0} failed assertion: {1}", Filename, s);
|
||||
}
|
||||
|
||||
protected void Debug(String s)
|
||||
{
|
||||
Debug(1, s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user