mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:50:37 +02:00
* Patch from Luiz Americo to fix TJSONBoolean.AsString, also fixed testcases
git-svn-id: trunk@15854 -
This commit is contained in:
parent
482c00a876
commit
f939bb3848
@ -724,7 +724,7 @@ end;
|
||||
|
||||
function TJSONboolean.GetAsString: TJSONStringType;
|
||||
begin
|
||||
Result:=BoolToStr(FValue);
|
||||
Result:=BoolToStr(FValue, True);
|
||||
end;
|
||||
|
||||
procedure TJSONboolean.SetAsString(const AValue: TJSONStringType);
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user