Skip to content

Commit

Permalink
Fix incorrectly cased strings in client properties test
Browse files Browse the repository at this point in the history
  • Loading branch information
fourls committed Jun 3, 2024
1 parent 67e80b7 commit 52d3623
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions client/test/DelphiLintTest.Properties.pas
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ procedure TPropertiesTest.TestEmptyLongStringField;
var
Field: TLongStringPropField;
Ini: TIniFile;
Path: String;
Path: string;
begin
Path := TPath.GetTempFileName;
TFile.WriteAllText(Path, '', TEncoding.ASCII); // Clear file
Expand Down Expand Up @@ -87,8 +87,8 @@ procedure TPropertiesTest.TestLongStringField;
var
Field: TLongStringPropField;
Ini: TIniFile;
Path: String;
Expected: String;
Path: string;
Expected: string;
begin
Path := TPath.GetTempFileName;
TFile.WriteAllText(Path, '', TEncoding.ASCII); // Clear file
Expand All @@ -99,16 +99,16 @@ procedure TPropertiesTest.TestLongStringField;
Ini.WriteString(CSection, CSizeKey, '1');
Ini.WriteString(CSection, CKey + '_0', Expected);
Field.Load(Ini);
Assert.AreEqual<String>(Expected, Field.Value);
Assert.AreEqual<string>(Expected, Field.Value);

Ini.WriteString(CSection, CKey + '_1', StringOfChar('b', 1000));
Field.Load(Ini);
Assert.AreEqual<String>(Expected, Field.Value);
Assert.AreEqual<string>(Expected, Field.Value);

Ini.WriteString(CSection, CSizeKey, '2');
Expected := Expected + StringOfChar('b', 1000);
Field.Load(Ini);
Assert.AreEqual<String>(Expected, Field.Value);
Assert.AreEqual<string>(Expected, Field.Value);

Field.Value := StringOfChar('c', 6000);
Field.Save(Ini);
Expand Down Expand Up @@ -138,7 +138,7 @@ procedure TPropertiesTest.TestLongStringFieldCleansUpWhenShortened;
var
Field: TLongStringPropField;
Ini: TIniFile;
Path: String;
Path: string;
begin
Path := TPath.GetTempFileName;
TFile.WriteAllText(Path, '', TEncoding.ASCII); // Clear file
Expand Down Expand Up @@ -173,8 +173,8 @@ procedure TPropertiesTest.TestLongStringFieldMigrationPath;
var
Field: TLongStringPropField;
Ini: TIniFile;
Path: String;
Expected: String;
Path: string;
Expected: string;
begin
Path := TPath.GetTempFileName;
TFile.WriteAllText(Path, '', TEncoding.ASCII); // Clear file
Expand All @@ -184,7 +184,7 @@ procedure TPropertiesTest.TestLongStringFieldMigrationPath;
Expected := StringOfChar('a', 1000);
Ini.WriteString(CSection, CKey, Expected);
Field.Load(Ini);
Assert.AreEqual<String>(Expected, Field.Value);
Assert.AreEqual<string>(Expected, Field.Value);

Field.Save(Ini);
Assert.IsFalse(Ini.ValueExists(CSection, CKey));
Expand Down

0 comments on commit 52d3623

Please sign in to comment.