public JSValue asserta(Function f, JSValue sample) { if (sample == null || !sample.Exists) { sample = Boolean.True; } if (!JSObject.@is(f.Call(null), sample)) { var message = f.ToString(); message = message.Substring(message.IndexOf("=>") + 2).Trim(); LogMessage(LogLevel.Error, message + " not equals " + sample); } return(JSValue.undefined); }
public static JSValue asserta(Function f, JSValue sample) { if (sample == null || !sample.Exists) { sample = Boolean.True; } if (!JSObject.@is(f.Call(null), sample)) { var message = f.ToString(); message = message.Substring(message.IndexOf("=>") + 2).Trim(); System.Diagnostics.Debug.Fail(message + " not equals " + sample); } return(JSValue.undefined); }