-Explicit culture for tests

-Tests
This commit is contained in:
James Newton-King
2014-12-22 00:11:57 +13:00
parent 55ccac4d92
commit e9dc993fc3
23 changed files with 442 additions and 74 deletions
+3 -34
View File
@@ -251,7 +251,7 @@ namespace Newtonsoft.Json
get
{
int depth = _stack.Count;
if (IsStartToken(TokenType) || _currentPosition.Type == JsonContainerType.None)
if (JsonTokenUtils.IsStartToken(TokenType) || _currentPosition.Type == JsonContainerType.None)
return depth;
else
return depth + 1;
@@ -712,7 +712,7 @@ namespace Newtonsoft.Json
if (t == JsonToken.Null)
return null;
if (IsPrimitiveToken(t))
if (JsonTokenUtils.IsPrimitiveToken(t))
{
if (Value != null)
{
@@ -823,7 +823,7 @@ namespace Newtonsoft.Json
if (TokenType == JsonToken.PropertyName)
Read();
if (IsStartToken(TokenType))
if (JsonTokenUtils.IsStartToken(TokenType))
{
int depth = Depth;
@@ -963,37 +963,6 @@ namespace Newtonsoft.Json
_currentState = State.Finished;
}
internal static bool IsPrimitiveToken(JsonToken token)
{
switch (token)
{
case JsonToken.Integer:
case JsonToken.Float:
case JsonToken.String:
case JsonToken.Boolean:
case JsonToken.Undefined:
case JsonToken.Null:
case JsonToken.Date:
case JsonToken.Bytes:
return true;
default:
return false;
}
}
internal static bool IsStartToken(JsonToken token)
{
switch (token)
{
case JsonToken.StartObject:
case JsonToken.StartArray:
case JsonToken.StartConstructor:
return true;
default:
return false;
}
}
private JsonContainerType GetTypeForCloseToken(JsonToken token)
{
switch (token)