protected CompilerTestException( TestCaseError reason, SerializationInfo info, StreamingContext context) : base(info, context) { Reason = reason; }
public void ValidateFrameworkDateTimeImplementationContract(String testFormat) { List <TestCaseError> incorrectResults = new List <TestCaseError>(); foreach (HdDateTime testValue in TestHdDateDates) { String source = testValue.ToString(testFormat); DateTime parsedValue = DateTime.Parse(source); if (testValue.DateTime != parsedValue) { Int64 nanoseconds = testValue.EpochNanoseconds; Int64 testTicks = testValue.DateTime.Ticks; Int64 parsedTicks = parsedValue.Ticks; // remove loose precision if (testTicks - parsedTicks == -1 && (nanoseconds % 100 >= 50)) { } else { TestCaseError error = new TestCaseError() { Nanoseconds = nanoseconds, TestTicks = testTicks, ParsedTicks = parsedTicks, Format = testFormat, Source = source }; incorrectResults.Add(error); } } } Assert.IsTrue(incorrectResults.Count == 0); }
public CompilerTestException(TestCaseError reason, string message, Exception inner) : base(message, inner) { Reason = reason; }
public CompilerTestException(TestCaseError reason) { Reason = reason; }