* Patch from Luiz Americo to fix TJSONBoolean.AsString, also fixed testcases

git-svn-id: trunk@15854 -
This commit is contained in:
michael 2010-08-19 17:04:05 +00:00
parent 482c00a876
commit f939bb3848
3 changed files with 10 additions and 5 deletions

View File

@ -724,7 +724,7 @@ end;
function TJSONboolean.GetAsString: TJSONStringType;
begin
Result:=BoolToStr(FValue);
Result:=BoolToStr(FValue, True);
end;
procedure TJSONboolean.SetAsString(const AValue: TJSONStringType);

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<Version Value="8"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
@ -58,10 +58,15 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Version Value="9"/>
<SearchPaths>
<OtherUnitFiles Value="../src/"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>

View File

@ -399,7 +399,7 @@ begin
TestAsBoolean(J,True);
TestAsInteger(J,1);
TestAsInt64(J,1);
TestAsString(J,BoolToStr(True));
TestAsString(J,BoolToStr(True,True));
TestAsFloat(J,1.0);
finally
FreeAndNil(J);
@ -421,7 +421,7 @@ begin
TestAsBoolean(J,False);
TestAsInteger(J,0);
TestAsInt64(J,0);
TestAsString(J,BoolToStr(False));
TestAsString(J,BoolToStr(False,True));
TestAsFloat(J,0.0);
finally
FreeAndNil(J);