chore(clean): remove all old FPC compiler directives we don't need in Blaise

There were still from the days when FPC compiled Blaise's tests.
This commit is contained in:
Graeme Geldenhuys 2026-05-21 17:23:38 +01:00
parent ffe09b395f
commit a6c87e33ea
70 changed files with 66 additions and 206 deletions

View file

@ -8,8 +8,6 @@
program TestRunner; program TestRunner;
{$mode objfpc}{$H+}
uses uses
blaise.testing, blaise.testing,
blaise.testing.runner.text, blaise.testing.runner.text,

View file

@ -8,8 +8,6 @@
unit cp.test.attributes; unit cp.test.attributes;
{$mode objfpc}{$H+}
{ Tests for the custom attribute system. { Tests for the custom attribute system.
Covers: Covers:

View file

@ -8,8 +8,6 @@
unit cp.test.booleanops; unit cp.test.booleanops;
{$mode objfpc}{$H+}
{ Tests for the AND / OR / NOT logical operators on Boolean operands. } { Tests for the AND / OR / NOT logical operators on Boolean operands. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.caseenum; unit cp.test.caseenum;
{$mode objfpc}{$H+}
{ Tests for case statements and enum types — required for self-hosting. { Tests for case statements and enum types — required for self-hosting.
The compiler source uses both throughout (TTokenKind, TTypeKind, etc.). } The compiler source uses both throughout (TTokenKind, TTypeKind, etc.). }
@ -526,7 +524,7 @@ const
begin begin
S := 'foo'; S := 'foo';
case S of case S of
1: S := 'one' 1: S := 'one'
end end
end. end.
'''; ''';

View file

@ -8,8 +8,6 @@
unit cp.test.chainedfields; unit cp.test.chainedfields;
{$mode objfpc}{$H+}
{ Tests for chained field access expressions: A.B.C and deeper. } { Tests for chained field access expressions: A.B.C and deeper. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.classes; unit cp.test.classes;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.classof; unit cp.test.classof;
{$mode objfpc}{$H+}
{ Tests for 'class of TFoo' metaclass type support — Step 11a. } { Tests for 'class of TFoo' metaclass type support — Step 11a. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.codegen; unit cp.test.codegen;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.collections; unit cp.test.collections;
{$mode objfpc}{$H+}
{ Tests for TObjectList and TStringList built in pure Blaise Pascal: { Tests for TObjectList and TStringList built in pure Blaise Pascal:
- TObjectList: dynamic Pointer array, optional ownership - TObjectList: dynamic Pointer array, optional ownership
- TStringList: dynamic string + Pointer parallel arrays with - TStringList: dynamic string + Pointer parallel arrays with

View file

@ -8,8 +8,6 @@
unit cp.test.config; unit cp.test.config;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.constants; unit cp.test.constants;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.control; unit cp.test.control;
{$mode objfpc}{$H+}
{ Tests for control flow: if/else, comparison operators, compound statements. { Tests for control flow: if/else, comparison operators, compound statements.
Future: while, repeat, for. } Future: while, repeat, for. }

View file

@ -8,8 +8,6 @@
unit cp.test.dynarray; unit cp.test.dynarray;
{$mode objfpc}{$H+}
{ Tests for dynamic array type declarations: { Tests for dynamic array type declarations:
parsing, semantic analysis, and QBE IR code generation. parsing, semantic analysis, and QBE IR code generation.

View file

@ -8,8 +8,6 @@
unit cp.test.exceptions; unit cp.test.exceptions;
{$mode objfpc}{$H+}
{ Tests for try/finally, try/except, and raise statements. } { Tests for try/finally, try/except, and raise statements. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.external; unit cp.test.external;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.flowjumps; unit cp.test.flowjumps;
{$mode objfpc}{$H+}
{ Tests for non-local flow statements: Exit and Break. } { Tests for non-local flow statements: Exit and Break. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.forin; unit cp.test.forin;
{$mode objfpc}{$H+}
{ Tests for for..in loop: class-based enumerators, static array, dynamic array, string, and set iteration. } { Tests for for..in loop: class-based enumerators, static array, dynamic array, string, and set iteration. }
interface interface
@ -200,8 +198,8 @@ const
'''; ''';
SrcForIn = SrcForIn =
'program P;' + #10 + 'program P;' + #10 +
SrcEnumTypes + #10 + SrcEnumTypes + #10 +
''' '''
var var
Col: TMyCol; Col: TMyCol;
@ -331,8 +329,8 @@ end;
procedure TForInTests.TestSemantic_ForIn_VarTypeMismatch_RaisesError; procedure TForInTests.TestSemantic_ForIn_VarTypeMismatch_RaisesError;
begin begin
AnalyseExpectError( AnalyseExpectError(
'program P;' + #10 + 'program P;' + #10 +
SrcEnumTypes + #10 + SrcEnumTypes + #10 +
''' '''
var var
Col: TMyCol; Col: TMyCol;

View file

@ -8,8 +8,6 @@
unit cp.test.forloop; unit cp.test.forloop;
{$mode objfpc}{$H+}
{ Tests for for-loop: to and downto forms. } { Tests for for-loop: to and downto forms. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.functions; unit cp.test.functions;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.genericconstraints; unit cp.test.genericconstraints;
{$mode objfpc}{$H+}
{ Tests for generic type parameter constraints: { Tests for generic type parameter constraints:
<T: class> — T must be a class type <T: class> — T must be a class type
<T: record> — T must be a value type <T: record> — T must be a value type

View file

@ -8,8 +8,6 @@
unit cp.test.genericdefaults; unit cp.test.genericdefaults;
{$mode objfpc}{$H+}
{ Tests for Generics.Defaults: IEqualityComparer<T>, IComparer<T>, and the { Tests for Generics.Defaults: IEqualityComparer<T>, IComparer<T>, and the
concrete implementations TIntegerEqualityComparer and TIntegerComparer. concrete implementations TIntegerEqualityComparer and TIntegerComparer.
Exercises generic interface parsing, semantic instantiation, and codegen. } Exercises generic interface parsing, semantic instantiation, and codegen. }

View file

@ -8,8 +8,6 @@
unit cp.test.genericforin; unit cp.test.genericforin;
{$mode objfpc}{$H+}
{ Tests for for..in support on generic collections (Step 9b). { Tests for for..in support on generic collections (Step 9b).
Two blockers: Two blockers:

View file

@ -8,8 +8,6 @@
unit cp.test.genericfuncs; unit cp.test.genericfuncs;
{$mode objfpc}{$H+}
{ Tests for standalone generic function monomorphization. { Tests for standalone generic function monomorphization.
Syntax: function Name<T>(Param: T): T — demand-driven instantiation on first call. } Syntax: function Name<T>(Param: T): T — demand-driven instantiation on first call. }

View file

@ -8,8 +8,6 @@
unit cp.test.genericintfs; unit cp.test.genericintfs;
{$mode objfpc}{$H+}
{ Tests for generic interfaces: IFoo<T> = interface ... end, class implements { Tests for generic interfaces: IFoo<T> = interface ... end, class implements
IFoo<Integer>, and codegen for the resulting itab/typeinfo. } IFoo<Integer>, and codegen for the resulting itab/typeinfo. }

View file

@ -8,8 +8,6 @@
unit cp.test.genericmethodimpls; unit cp.test.genericmethodimpls;
{$mode objfpc}{$H+}
{ Tests for generic class method implementations in standalone form: { Tests for generic class method implementations in standalone form:
procedure TList<T>.Add(Value: T); procedure TList<T>.Add(Value: T);
begin ... end; begin ... end;

View file

@ -8,8 +8,6 @@
unit cp.test.generics; unit cp.test.generics;
{$mode objfpc}{$H+}
{ Tests for generic type monomorphization. { Tests for generic type monomorphization.
Phase 3 scope: single type-parameter classes with inline method bodies; Phase 3 scope: single type-parameter classes with inline method bodies;
standalone generic method implementations are not supported yet. } standalone generic method implementations are not supported yet. }

View file

@ -8,8 +8,6 @@
unit cp.test.imap; unit cp.test.imap;
{$mode objfpc}{$H+}
{ IR unit tests for IMap<K,V>: the generic map interface that TDictionary and { IR unit tests for IMap<K,V>: the generic map interface that TDictionary and
TOrderedDictionary both implement. Exercises: TOrderedDictionary both implement. Exercises:
- parsing IMap<K,V> interface definition with two type params - parsing IMap<K,V> interface definition with two type params

View file

@ -8,8 +8,6 @@
unit cp.test.inherit; unit cp.test.inherit;
{$mode objfpc}{$H+}
{ Tests for class inheritance, self-referential types, and nil. } { Tests for class inheritance, self-referential types, and nil. }
interface interface
@ -147,7 +145,7 @@ end;
const const
SrcNilAssign = SrcNilAssign =
'program P;' + #10 + 'program P;' + #10 +
'var C: TNode;' + #10 + { forward ref — TNode defined after } 'var C: TNode;' + #10 + { forward ref — TNode defined after }
''' '''
type type

View file

@ -8,8 +8,6 @@
unit cp.test.interfaces; unit cp.test.interfaces;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.lexer; unit cp.test.lexer;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.math; unit cp.test.math;
{$mode objfpc}{$H+}
{ IR-level tests for Math unit functions and math compiler builtins. { IR-level tests for Math unit functions and math compiler builtins.
Builtins (handled in uSemantic + uCodeGenQBE, no RTL unit needed): Builtins (handled in uSemantic + uCodeGenQBE, no RTL unit needed):

View file

@ -8,8 +8,6 @@
unit cp.test.methods; unit cp.test.methods;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.multifile; unit cp.test.multifile;
{$mode objfpc}{$H+}
{ Tests for multi-file compilation: TUnitLoader (search, cycle detection, { Tests for multi-file compilation: TUnitLoader (search, cycle detection,
dependency ordering), TSemanticAnalyser.AnalyseUnitForExport (cross-unit dependency ordering), TSemanticAnalyser.AnalyseUnitForExport (cross-unit
symbol visibility), and combined code generation via AppendUnit/AppendProgram. } symbol visibility), and combined code generation via AppendUnit/AppendProgram. }

View file

@ -8,8 +8,6 @@
unit cp.test.multiwrite; unit cp.test.multiwrite;
{$mode objfpc}{$H+}
{ Tests for multi-argument Write and WriteLn code generation. } { Tests for multi-argument Write and WriteLn code generation. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.opdf; unit cp.test.opdf;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.openarray; unit cp.test.openarray;
{$mode objfpc}{$H+}
{ Tests for const open array parameters: parsing, semantic analysis, { Tests for const open array parameters: parsing, semantic analysis,
and QBE IR code generation. } and QBE IR code generation. }

View file

@ -8,8 +8,6 @@
unit cp.test.overload; unit cp.test.overload;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.parser; unit cp.test.parser;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.pchar; unit cp.test.pchar;
{$mode objfpc}{$H+}
{ Tests for PChar type: PChar(str) cast and string(pchar) cast. { Tests for PChar type: PChar(str) cast and string(pchar) cast.
Covers semantic analysis and QBE IR code generation. } Covers semantic analysis and QBE IR code generation. }

View file

@ -8,8 +8,6 @@
unit cp.test.pointers; unit cp.test.pointers;
{$mode objfpc}{$H+}
{ Tests for pointer type infrastructure: ^T types, P^ dereference, { Tests for pointer type infrastructure: ^T types, P^ dereference,
P^ := V store, GetMem/FreeMem/ReallocMem built-ins, and pointer arithmetic. } P^ := V store, GetMem/FreeMem/ReallocMem built-ins, and pointer arithmetic. }

View file

@ -8,8 +8,6 @@
unit cp.test.process; unit cp.test.process;
{$mode objfpc}{$H+}
{ Tests for the process management built-ins: { Tests for the process management built-ins:
ProcessCreate, ProcessSetExe, ProcessAddArg, ProcessExecute, ProcessCreate, ProcessSetExe, ProcessAddArg, ProcessExecute,
ProcessRunning, ProcessReadOutput, ProcessWaitOnExit, ProcessRunning, ProcessReadOutput, ProcessWaitOnExit,

View file

@ -8,8 +8,6 @@
unit cp.test.procs; unit cp.test.procs;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.proctypes; unit cp.test.proctypes;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.proctypes_ofobject; unit cp.test.proctypes_ofobject;
{$mode objfpc}{$H+}
{ Tests for Step 11c — 'procedure of object' method-pointer types and the { Tests for Step 11c — 'procedure of object' method-pointer types and the
TMethod intrinsic record. TMethod intrinsic record.

View file

@ -8,8 +8,6 @@
unit cp.test.properties; unit cp.test.properties;
{$mode objfpc}{$H+}
{ Tests for Pascal property declarations — field-backed and method-backed. { Tests for Pascal property declarations — field-backed and method-backed.
Properties are transparent syntactic sugar: reads and writes redirect to Properties are transparent syntactic sugar: reads and writes redirect to
a backing field or method accessor. } a backing field or method accessor. }

View file

@ -8,8 +8,6 @@
unit cp.test.publishedrtti; unit cp.test.publishedrtti;
{$mode objfpc}{$H+}
{ Tests for Step 11b — published-method RTTI. Exercises: { Tests for Step 11b — published-method RTTI. Exercises:
* The parser tagging methods declared inside a 'published' visibility * The parser tagging methods declared inside a 'published' visibility

View file

@ -8,8 +8,6 @@
unit cp.test.records; unit cp.test.records;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.repeatloop; unit cp.test.repeatloop;
{$mode objfpc}{$H+}
{ Tests for repeat...until loop. } { Tests for repeat...until loop. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.selfhosting; unit cp.test.selfhosting;
{$mode objfpc}{$H+}
{ Tests for the two remaining self-hosting gaps: { Tests for the two remaining self-hosting gaps:
1. Multiple type/var sections in a single block 1. Multiple type/var sections in a single block
2. File I/O and CLI builtins: ParamStr, ParamCount, ReadFile, WriteFile, 2. File I/O and CLI builtins: ParamStr, ParamCount, ReadFile, WriteFile,

View file

@ -8,8 +8,6 @@
unit cp.test.semantic; unit cp.test.semantic;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.sets; unit cp.test.sets;
{$mode objfpc}{$H+}
{ Tests for Pascal set types — set of EnumType, set literals, in operator, { Tests for Pascal set types — set of EnumType, set literals, in operator,
Include/Exclude built-ins, and set arithmetic operators. } Include/Exclude built-ins, and set arithmetic operators. }
@ -88,7 +86,7 @@ const
{ dNorth=0 → bit 0 = 1; dEast=2 → bit 2 = 4; mask = 5 } { dNorth=0 → bit 0 = 1; dEast=2 → bit 2 = 4; mask = 5 }
SrcSetTypeDecl = SrcSetTypeDecl =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
begin begin
@ -96,7 +94,7 @@ const
'''; ''';
SrcSetEmptyLiteral = SrcSetEmptyLiteral =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S: TDirSet; var S: TDirSet;
@ -106,15 +104,15 @@ const
'''; ''';
SrcSetTwoElementLiteral = SrcSetTwoElementLiteral =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
'var S: TDirSet;' + #10 + 'var S: TDirSet;' + #10 +
'begin' + #10 + 'begin' + #10 +
' S := [dNorth, dEast]' + #10 + { mask = 1 + 4 = 5 } ' S := [dNorth, dEast]' + #10 + { mask = 1 + 4 = 5 }
'end.'; 'end.';
SrcSetInOperator = SrcSetInOperator =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S: TDirSet; B: Boolean; var S: TDirSet; B: Boolean;
@ -125,7 +123,7 @@ const
'''; ''';
SrcSetInclude = SrcSetInclude =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S: TDirSet; var S: TDirSet;
@ -136,7 +134,7 @@ const
'''; ''';
SrcSetExclude = SrcSetExclude =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S: TDirSet; var S: TDirSet;
@ -147,7 +145,7 @@ const
'''; ''';
SrcSetUnion = SrcSetUnion =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S1, S2, S3: TDirSet; var S1, S2, S3: TDirSet;
@ -159,7 +157,7 @@ const
'''; ''';
SrcSetDifference = SrcSetDifference =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S1, S2, S3: TDirSet; var S1, S2, S3: TDirSet;
@ -171,7 +169,7 @@ const
'''; ''';
SrcSetIntersection = SrcSetIntersection =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S1, S2, S3: TDirSet; var S1, S2, S3: TDirSet;
@ -183,7 +181,7 @@ const
'''; ''';
SrcSetEquality = SrcSetEquality =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S1, S2: TDirSet; B: Boolean; var S1, S2: TDirSet; B: Boolean;
@ -195,7 +193,7 @@ const
'''; ''';
SrcSetInequality = SrcSetInequality =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S1, S2: TDirSet; B: Boolean; var S1, S2: TDirSet; B: Boolean;
@ -215,12 +213,12 @@ const
'''; ''';
SrcSetBadLiteralElement = SrcSetBadLiteralElement =
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
'type TColors = (cRed, cBlue);' + #10 + 'type TColors = (cRed, cBlue);' + #10 +
'type TColorSet = set of TColors;' + #10 + 'type TColorSet = set of TColors;' + #10 +
'var S: TDirSet;' + #10 + 'var S: TDirSet;' + #10 +
'begin' + #10 + 'begin' + #10 +
' S := [cRed]' + #10 + { TColors element in TDirSet → error } ' S := [cRed]' + #10 + { TColors element in TDirSet → error }
'end.'; 'end.';
@ -475,7 +473,7 @@ var
begin begin
{ [dNorth] → ordinal 0 → bit 0 → mask 1 → emits "copy 1" } { [dNorth] → ordinal 0 → bit 0 → mask 1 → emits "copy 1" }
IR := GenIR( IR := GenIR(
'program P;' + #10 + 'program P;' + #10 +
DirEnum + DirEnum +
''' '''
var S: TDirSet; var S: TDirSet;

View file

@ -8,8 +8,6 @@
unit cp.test.staticarray; unit cp.test.staticarray;
{$mode objfpc}{$H+}
{ Tests for static array declarations and element access: { Tests for static array declarations and element access:
parsing, semantic analysis, and QBE IR code generation. } parsing, semantic analysis, and QBE IR code generation. }

View file

@ -8,8 +8,6 @@
unit cp.test.streams; unit cp.test.streams;
{$mode objfpc}{$H+}
{ IR-level tests for the streams design. { IR-level tests for the streams design.
These tests are deliberately self-contained — they declare the stream These tests are deliberately self-contained — they declare the stream

View file

@ -8,8 +8,6 @@
unit cp.test.stringops; unit cp.test.stringops;
{$mode objfpc}{$H+}
{ Tests for built-in string operation functions: { Tests for built-in string operation functions:
Length, Pos, Copy, UpperCase, LowerCase, SameText, IntToStr, StrToInt. } Length, Pos, Copy, UpperCase, LowerCase, SameText, IntToStr, StrToInt. }

View file

@ -8,8 +8,6 @@
unit cp.test.strutils; unit cp.test.strutils;
{$mode objfpc}{$H+}
{ IR-level tests for StrUtils unit functions. { IR-level tests for StrUtils unit functions.
These tests verify that the compiler resolves StrUtils identifiers and These tests verify that the compiler resolves StrUtils identifiers and
type-checks arguments correctly. Since StrUtils is now implemented in type-checks arguments correctly. Since StrUtils is now implemented in

View file

@ -8,8 +8,6 @@
unit cp.test.symtable; unit cp.test.symtable;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.tdictionary; unit cp.test.tdictionary;
{$mode objfpc}{$H+}
{ Tests for TDictionary<K,V> generic map: two-type-param generic, { Tests for TDictionary<K,V> generic map: two-type-param generic,
FindKey/Add/TryGetValue/ContainsKey/Remove operations, Count property. FindKey/Add/TryGetValue/ContainsKey/Remove operations, Count property.
@ -187,7 +185,7 @@ const
{ Complete programs using TDictionary<Integer,Integer> } { Complete programs using TDictionary<Integer,Integer> }
SrcCreate = SrcCreate =
'program P;' + #10 + 'program P;' + #10 +
DictDecl + DictDecl +
DictImpls + DictImpls +
''' '''
@ -198,7 +196,7 @@ const
'''; ''';
SrcAddGet = SrcAddGet =
'program P;' + #10 + 'program P;' + #10 +
DictDecl + DictDecl +
DictImpls + DictImpls +
''' '''
@ -214,7 +212,7 @@ const
'''; ''';
SrcTryGet = SrcTryGet =
'program P;' + #10 + 'program P;' + #10 +
DictDecl + DictDecl +
DictImpls + DictImpls +
''' '''
@ -230,7 +228,7 @@ const
'''; ''';
SrcRemove = SrcRemove =
'program P;' + #10 + 'program P;' + #10 +
DictDecl + DictDecl +
DictImpls + DictImpls +
''' '''

View file

@ -8,8 +8,6 @@
unit cp.test.textblock; unit cp.test.textblock;
{$mode objfpc}{$H+}
interface interface
uses uses
@ -59,8 +57,8 @@ procedure TTextBlockTests.TestTextBlock_Basic;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
'hello' + #10 + 'hello' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -71,9 +69,9 @@ procedure TTextBlockTests.TestTextBlock_MarginStrip;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
' line one' + #10 + ' line one' + #10 +
' line two' + #10 + ' line two' + #10 +
' ' + TQ); ' ' + TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -84,8 +82,8 @@ procedure TTextBlockTests.TestTextBlock_EmbeddedSingleQuote;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
'it' + #39 + 's here' + #10 + 'it' + #39 + 's here' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -96,7 +94,7 @@ procedure TTextBlockTests.TestTextBlock_EmptyBlock;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -107,8 +105,8 @@ procedure TTextBlockTests.TestTextBlock_SingleContentLine;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
'only line' + #10 + 'only line' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -119,8 +117,8 @@ procedure TTextBlockTests.TestTextBlock_NoMarginStrip_CloserAtCol1;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
' indented' + #10 + ' indented' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -131,10 +129,10 @@ procedure TTextBlockTests.TestTextBlock_PreservesRelativeIndent;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
' begin' + #10 + ' begin' + #10 +
' X := 1;' + #10 + ' X := 1;' + #10 +
' end.' + #10 + ' end.' + #10 +
' ' + TQ); ' ' + TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -158,8 +156,8 @@ procedure TTextBlockTests.TestTextBlock_TrailingContentAfterCloser;
var var
tok, tok2: TToken; tok, tok2: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
'content' + #10 + 'content' + #10 +
TQ + ';'); TQ + ';');
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -172,8 +170,8 @@ procedure TTextBlockTests.TestTextBlock_TabsInContent;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
#9 + 'tabbed' + #10 + #9 + 'tabbed' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
@ -184,10 +182,10 @@ procedure TTextBlockTests.TestTextBlock_BlankLinesPreserved;
var var
tok: TToken; tok: TToken;
begin begin
SetLexer(TQ + #10 + SetLexer(TQ + #10 +
'line one' + #10 + 'line one' + #10 +
'' + #10 + '' + #10 +
'line three' + #10 + 'line three' + #10 +
TQ); TQ);
tok := FLexer.Next; tok := FLexer.Next;
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind)); AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));

View file

@ -8,8 +8,6 @@
unit cp.test.tlist; unit cp.test.tlist;
{$mode objfpc}{$H+}
{ Tests for TList<T> generic dynamic list: type substitution with ^T fields, { Tests for TList<T> generic dynamic list: type substitution with ^T fields,
SizeOf built-in, nil/Pointer compatibility with typed pointers, and SizeOf built-in, nil/Pointer compatibility with typed pointers, and
end-to-end Add/Get/Count codegen. } end-to-end Add/Get/Count codegen. }

View file

@ -8,8 +8,6 @@
unit cp.test.tokenkindname; unit cp.test.tokenkindname;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -8,8 +8,6 @@
unit cp.test.tordereddictionary; unit cp.test.tordereddictionary;
{$mode objfpc}{$H+}
{ IR unit tests for TOrderedDictionary<K,V>: insertion-ordered map. { IR unit tests for TOrderedDictionary<K,V>: insertion-ordered map.
Verifies Add/TryGetValue/ContainsKey/Remove/GetKey/GetValue codegen. Verifies Add/TryGetValue/ContainsKey/Remove/GetKey/GetValue codegen.
Uses Integer keys and Integer values throughout. } Uses Integer keys and Integer values throughout. }

View file

@ -8,8 +8,6 @@
unit cp.test.tqueue; unit cp.test.tqueue;
{$mode objfpc}{$H+}
{ IR unit tests for TQueue<T>: Enqueue/Dequeue/Peek/Clear/Destroy and Grow. { IR unit tests for TQueue<T>: Enqueue/Dequeue/Peek/Clear/Destroy and Grow.
Uses Integer as the type parameter throughout. } Uses Integer as the type parameter throughout. }

View file

@ -8,8 +8,6 @@
unit cp.test.tset; unit cp.test.tset;
{$mode objfpc}{$H+}
{ IR unit tests for TSet<T>: Include/Exclude/Contains/Clear/Destroy and Grow. { IR unit tests for TSet<T>: Include/Exclude/Contains/Clear/Destroy and Grow.
Uses Integer as the type parameter throughout. } Uses Integer as the type parameter throughout. }

View file

@ -8,8 +8,6 @@
unit cp.test.tstack; unit cp.test.tstack;
{$mode objfpc}{$H+}
{ IR unit tests for TStack<T>: Push/Pop/Peek/Clear/Destroy and Grow. { IR unit tests for TStack<T>: Push/Pop/Peek/Clear/Destroy and Grow.
Uses Integer as the type parameter throughout. } Uses Integer as the type parameter throughout. }

View file

@ -8,8 +8,6 @@
unit cp.test.typetests; unit cp.test.typetests;
{$mode objfpc}{$H+}
{ Tests for the 'is' and 'as' type-test operators. } { Tests for the 'is' and 'as' type-test operators. }
interface interface

View file

@ -8,8 +8,6 @@
unit cp.test.units; unit cp.test.units;
{$mode objfpc}{$H+}
{ Tests for unit interface/implementation: parsing, semantic analysis, { Tests for unit interface/implementation: parsing, semantic analysis,
and code generation. Cross-unit 'uses' loading is out of scope here. } and code generation. Cross-unit 'uses' loading is out of scope here. }
@ -349,10 +347,10 @@ end;
procedure TUnitTests.TestSemantic_Unit_SignatureMismatch_ParamCount_RaisesError; procedure TUnitTests.TestSemantic_Unit_SignatureMismatch_ParamCount_RaisesError;
begin begin
AnalyseUnitExpectError( AnalyseUnitExpectError(
'unit Bad;' + #10 + 'unit Bad;' + #10 +
'interface' + #10 + 'interface' + #10 +
'function Add(A, B: Integer): Integer;' + #10 + 'function Add(A, B: Integer): Integer;' + #10 +
'implementation' + #10 + 'implementation' + #10 +
'function Add(A: Integer): Integer;' + #10 + { wrong: 1 param } 'function Add(A: Integer): Integer;' + #10 + { wrong: 1 param }
''' '''
begin begin

View file

@ -8,8 +8,6 @@
unit cp.test.varparams; unit cp.test.varparams;
{$mode objfpc}{$H+}
{ Tests for var parameters: pass-by-reference semantics across { Tests for var parameters: pass-by-reference semantics across
lexer, parser, semantic analysis, and code generation. } lexer, parser, semantic analysis, and code generation. }
@ -235,10 +233,10 @@ end;
procedure TVarParamTests.TestSemantic_VarParam_NonVariable_RaisesError; procedure TVarParamTests.TestSemantic_VarParam_NonVariable_RaisesError;
begin begin
AnalyseExpectError( AnalyseExpectError(
'program Bad;' + #10 + 'program Bad;' + #10 +
'procedure Inc(var X: Integer);' + #10 + 'procedure Inc(var X: Integer);' + #10 +
'begin X := X + 1 end;' + #10 + 'begin X := X + 1 end;' + #10 +
'begin' + #10 + 'begin' + #10 +
' Inc(42)' + #10 + { literal, not a variable } ' Inc(42)' + #10 + { literal, not a variable }
'end.'); 'end.');
end; end;
@ -246,11 +244,11 @@ end;
procedure TVarParamTests.TestSemantic_VarParam_TypeMismatch_RaisesError; procedure TVarParamTests.TestSemantic_VarParam_TypeMismatch_RaisesError;
begin begin
AnalyseExpectError( AnalyseExpectError(
'program Bad;' + #10 + 'program Bad;' + #10 +
'procedure SetI(var X: Integer);' + #10 + 'procedure SetI(var X: Integer);' + #10 +
'begin X := 1 end;' + #10 + 'begin X := 1 end;' + #10 +
'var B: Boolean;' + #10 + 'var B: Boolean;' + #10 +
'begin' + #10 + 'begin' + #10 +
' SetI(B)' + #10 + { wrong type } ' SetI(B)' + #10 + { wrong type }
'end.'); 'end.');
end; end;

View file

@ -8,8 +8,6 @@
unit cp.test.vtable; unit cp.test.vtable;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -25,8 +25,6 @@
unit cp.test.weakref; unit cp.test.weakref;
{$mode objfpc}{$H+}
interface interface
uses uses

View file

@ -24,8 +24,6 @@
program testbcl; program testbcl;
{$mode objfpc}{$H+}
uses uses
blaise.testing, blaise.testing,
blaise.testing.runner.text; blaise.testing.runner.text;