From 719038b8eba0b4d309cf84a34088fd4cfc7c923e Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 20 Nov 2012 22:42:26 +1300 Subject: [PATCH] -Fixed build --- Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs index 67f0bdda..7a694976 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs @@ -387,7 +387,9 @@ namespace Newtonsoft.Json.Tests.Linq ExceptionAssert.Throws("Can not convert TimeSpan to Guid.", () => { var i = (Guid)new JValue(TimeSpan.FromMinutes(1)); }); ExceptionAssert.Throws("Can not convert Uri to Guid.", () => { var i = (Guid)new JValue(new Uri("http://www.google.com")); }); +#if !NET20 ExceptionAssert.Throws("Can not convert Boolean to DateTimeOffset.", () => { var i = (DateTimeOffset)new JValue(true); }); +#endif ExceptionAssert.Throws("Can not convert Boolean to Uri.", () => { var i = (Uri)new JValue(true); }); }