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:
parent
ffe09b395f
commit
a6c87e33ea
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
program TestRunner;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
blaise.testing,
|
||||
blaise.testing.runner.text,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.attributes;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for the custom attribute system.
|
||||
|
||||
Covers:
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.booleanops;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for the AND / OR / NOT logical operators on Boolean operands. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.caseenum;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for case statements and enum types — required for self-hosting.
|
||||
The compiler source uses both throughout (TTokenKind, TTypeKind, etc.). }
|
||||
|
||||
|
|
@ -526,7 +524,7 @@ const
|
|||
begin
|
||||
S := 'foo';
|
||||
case S of
|
||||
1: S := 'one'
|
||||
1: S := 'one'
|
||||
end
|
||||
end.
|
||||
''';
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.chainedfields;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for chained field access expressions: A.B.C and deeper. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.classes;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.classof;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for 'class of TFoo' metaclass type support — Step 11a. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.codegen;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.collections;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for TObjectList and TStringList built in pure Blaise Pascal:
|
||||
- TObjectList: dynamic Pointer array, optional ownership
|
||||
- TStringList: dynamic string + Pointer parallel arrays with
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.config;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.constants;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.control;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for control flow: if/else, comparison operators, compound statements.
|
||||
Future: while, repeat, for. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.dynarray;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for dynamic array type declarations:
|
||||
parsing, semantic analysis, and QBE IR code generation.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.exceptions;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for try/finally, try/except, and raise statements. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.external;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.flowjumps;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for non-local flow statements: Exit and Break. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.forin;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for for..in loop: class-based enumerators, static array, dynamic array, string, and set iteration. }
|
||||
|
||||
interface
|
||||
|
|
@ -200,8 +198,8 @@ const
|
|||
''';
|
||||
|
||||
SrcForIn =
|
||||
'program P;' + #10 +
|
||||
SrcEnumTypes + #10 +
|
||||
'program P;' + #10 +
|
||||
SrcEnumTypes + #10 +
|
||||
'''
|
||||
var
|
||||
Col: TMyCol;
|
||||
|
|
@ -331,8 +329,8 @@ end;
|
|||
procedure TForInTests.TestSemantic_ForIn_VarTypeMismatch_RaisesError;
|
||||
begin
|
||||
AnalyseExpectError(
|
||||
'program P;' + #10 +
|
||||
SrcEnumTypes + #10 +
|
||||
'program P;' + #10 +
|
||||
SrcEnumTypes + #10 +
|
||||
'''
|
||||
var
|
||||
Col: TMyCol;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.forloop;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for for-loop: to and downto forms. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.functions;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericconstraints;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for generic type parameter constraints:
|
||||
<T: class> — T must be a class type
|
||||
<T: record> — T must be a value type
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericdefaults;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for Generics.Defaults: IEqualityComparer<T>, IComparer<T>, and the
|
||||
concrete implementations TIntegerEqualityComparer and TIntegerComparer.
|
||||
Exercises generic interface parsing, semantic instantiation, and codegen. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericforin;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for for..in support on generic collections (Step 9b).
|
||||
|
||||
Two blockers:
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericfuncs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for standalone generic function monomorphization.
|
||||
Syntax: function Name<T>(Param: T): T — demand-driven instantiation on first call. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericintfs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for generic interfaces: IFoo<T> = interface ... end, class implements
|
||||
IFoo<Integer>, and codegen for the resulting itab/typeinfo. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.genericmethodimpls;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for generic class method implementations in standalone form:
|
||||
procedure TList<T>.Add(Value: T);
|
||||
begin ... end;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.generics;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for generic type monomorphization.
|
||||
Phase 3 scope: single type-parameter classes with inline method bodies;
|
||||
standalone generic method implementations are not supported yet. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.imap;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR unit tests for IMap<K,V>: the generic map interface that TDictionary and
|
||||
TOrderedDictionary both implement. Exercises:
|
||||
- parsing IMap<K,V> interface definition with two type params
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.inherit;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for class inheritance, self-referential types, and nil. }
|
||||
|
||||
interface
|
||||
|
|
@ -147,7 +145,7 @@ end;
|
|||
|
||||
const
|
||||
SrcNilAssign =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
'var C: TNode;' + #10 + { forward ref — TNode defined after }
|
||||
'''
|
||||
type
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.interfaces;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.lexer;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.math;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR-level tests for Math unit functions and math compiler builtins.
|
||||
|
||||
Builtins (handled in uSemantic + uCodeGenQBE, no RTL unit needed):
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.methods;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.multifile;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for multi-file compilation: TUnitLoader (search, cycle detection,
|
||||
dependency ordering), TSemanticAnalyser.AnalyseUnitForExport (cross-unit
|
||||
symbol visibility), and combined code generation via AppendUnit/AppendProgram. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.multiwrite;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for multi-argument Write and WriteLn code generation. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.opdf;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.openarray;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for const open array parameters: parsing, semantic analysis,
|
||||
and QBE IR code generation. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.overload;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.parser;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.pchar;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for PChar type: PChar(str) cast and string(pchar) cast.
|
||||
Covers semantic analysis and QBE IR code generation. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.pointers;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for pointer type infrastructure: ^T types, P^ dereference,
|
||||
P^ := V store, GetMem/FreeMem/ReallocMem built-ins, and pointer arithmetic. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.process;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for the process management built-ins:
|
||||
ProcessCreate, ProcessSetExe, ProcessAddArg, ProcessExecute,
|
||||
ProcessRunning, ProcessReadOutput, ProcessWaitOnExit,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.procs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.proctypes;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.proctypes_ofobject;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for Step 11c — 'procedure of object' method-pointer types and the
|
||||
TMethod intrinsic record.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.properties;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for Pascal property declarations — field-backed and method-backed.
|
||||
Properties are transparent syntactic sugar: reads and writes redirect to
|
||||
a backing field or method accessor. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.publishedrtti;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for Step 11b — published-method RTTI. Exercises:
|
||||
|
||||
* The parser tagging methods declared inside a 'published' visibility
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.records;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.repeatloop;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for repeat...until loop. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.selfhosting;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for the two remaining self-hosting gaps:
|
||||
1. Multiple type/var sections in a single block
|
||||
2. File I/O and CLI builtins: ParamStr, ParamCount, ReadFile, WriteFile,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.semantic;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.sets;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for Pascal set types — set of EnumType, set literals, in operator,
|
||||
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 }
|
||||
SrcSetTypeDecl =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
begin
|
||||
|
|
@ -96,7 +94,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetEmptyLiteral =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S: TDirSet;
|
||||
|
|
@ -106,15 +104,15 @@ const
|
|||
''';
|
||||
|
||||
SrcSetTwoElementLiteral =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'var S: TDirSet;' + #10 +
|
||||
'begin' + #10 +
|
||||
'var S: TDirSet;' + #10 +
|
||||
'begin' + #10 +
|
||||
' S := [dNorth, dEast]' + #10 + { mask = 1 + 4 = 5 }
|
||||
'end.';
|
||||
|
||||
SrcSetInOperator =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S: TDirSet; B: Boolean;
|
||||
|
|
@ -125,7 +123,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetInclude =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S: TDirSet;
|
||||
|
|
@ -136,7 +134,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetExclude =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S: TDirSet;
|
||||
|
|
@ -147,7 +145,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetUnion =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S1, S2, S3: TDirSet;
|
||||
|
|
@ -159,7 +157,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetDifference =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S1, S2, S3: TDirSet;
|
||||
|
|
@ -171,7 +169,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetIntersection =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S1, S2, S3: TDirSet;
|
||||
|
|
@ -183,7 +181,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetEquality =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S1, S2: TDirSet; B: Boolean;
|
||||
|
|
@ -195,7 +193,7 @@ const
|
|||
''';
|
||||
|
||||
SrcSetInequality =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S1, S2: TDirSet; B: Boolean;
|
||||
|
|
@ -215,12 +213,12 @@ const
|
|||
''';
|
||||
|
||||
SrcSetBadLiteralElement =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'type TColors = (cRed, cBlue);' + #10 +
|
||||
'type TColorSet = set of TColors;' + #10 +
|
||||
'var S: TDirSet;' + #10 +
|
||||
'begin' + #10 +
|
||||
'type TColors = (cRed, cBlue);' + #10 +
|
||||
'type TColorSet = set of TColors;' + #10 +
|
||||
'var S: TDirSet;' + #10 +
|
||||
'begin' + #10 +
|
||||
' S := [cRed]' + #10 + { TColors element in TDirSet → error }
|
||||
'end.';
|
||||
|
||||
|
|
@ -475,7 +473,7 @@ var
|
|||
begin
|
||||
{ [dNorth] → ordinal 0 → bit 0 → mask 1 → emits "copy 1" }
|
||||
IR := GenIR(
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DirEnum +
|
||||
'''
|
||||
var S: TDirSet;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.staticarray;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for static array declarations and element access:
|
||||
parsing, semantic analysis, and QBE IR code generation. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.streams;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR-level tests for the streams design.
|
||||
|
||||
These tests are deliberately self-contained — they declare the stream
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.stringops;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for built-in string operation functions:
|
||||
Length, Pos, Copy, UpperCase, LowerCase, SameText, IntToStr, StrToInt. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.strutils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR-level tests for StrUtils unit functions.
|
||||
These tests verify that the compiler resolves StrUtils identifiers and
|
||||
type-checks arguments correctly. Since StrUtils is now implemented in
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.symtable;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tdictionary;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for TDictionary<K,V> generic map: two-type-param generic,
|
||||
FindKey/Add/TryGetValue/ContainsKey/Remove operations, Count property.
|
||||
|
||||
|
|
@ -187,7 +185,7 @@ const
|
|||
{ Complete programs using TDictionary<Integer,Integer> }
|
||||
|
||||
SrcCreate =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DictDecl +
|
||||
DictImpls +
|
||||
'''
|
||||
|
|
@ -198,7 +196,7 @@ const
|
|||
''';
|
||||
|
||||
SrcAddGet =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DictDecl +
|
||||
DictImpls +
|
||||
'''
|
||||
|
|
@ -214,7 +212,7 @@ const
|
|||
''';
|
||||
|
||||
SrcTryGet =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DictDecl +
|
||||
DictImpls +
|
||||
'''
|
||||
|
|
@ -230,7 +228,7 @@ const
|
|||
''';
|
||||
|
||||
SrcRemove =
|
||||
'program P;' + #10 +
|
||||
'program P;' + #10 +
|
||||
DictDecl +
|
||||
DictImpls +
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.textblock;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
@ -59,8 +57,8 @@ procedure TTextBlockTests.TestTextBlock_Basic;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
'hello' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
'hello' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -71,9 +69,9 @@ procedure TTextBlockTests.TestTextBlock_MarginStrip;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
' line one' + #10 +
|
||||
' line two' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
' line one' + #10 +
|
||||
' line two' + #10 +
|
||||
' ' + TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -84,8 +82,8 @@ procedure TTextBlockTests.TestTextBlock_EmbeddedSingleQuote;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
'it' + #39 + 's here' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
'it' + #39 + 's here' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -96,7 +94,7 @@ procedure TTextBlockTests.TestTextBlock_EmptyBlock;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -107,8 +105,8 @@ procedure TTextBlockTests.TestTextBlock_SingleContentLine;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
'only line' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
'only line' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -119,8 +117,8 @@ procedure TTextBlockTests.TestTextBlock_NoMarginStrip_CloserAtCol1;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
' indented' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
' indented' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -131,10 +129,10 @@ procedure TTextBlockTests.TestTextBlock_PreservesRelativeIndent;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
' begin' + #10 +
|
||||
' X := 1;' + #10 +
|
||||
' end.' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
' begin' + #10 +
|
||||
' X := 1;' + #10 +
|
||||
' end.' + #10 +
|
||||
' ' + TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -158,8 +156,8 @@ procedure TTextBlockTests.TestTextBlock_TrailingContentAfterCloser;
|
|||
var
|
||||
tok, tok2: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
'content' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
'content' + #10 +
|
||||
TQ + ';');
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -172,8 +170,8 @@ procedure TTextBlockTests.TestTextBlock_TabsInContent;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
#9 + 'tabbed' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
#9 + 'tabbed' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
@ -184,10 +182,10 @@ procedure TTextBlockTests.TestTextBlock_BlankLinesPreserved;
|
|||
var
|
||||
tok: TToken;
|
||||
begin
|
||||
SetLexer(TQ + #10 +
|
||||
'line one' + #10 +
|
||||
'' + #10 +
|
||||
'line three' + #10 +
|
||||
SetLexer(TQ + #10 +
|
||||
'line one' + #10 +
|
||||
'' + #10 +
|
||||
'line three' + #10 +
|
||||
TQ);
|
||||
tok := FLexer.Next;
|
||||
AssertEquals('Kind', Ord(tkStringLit), Ord(tok.Kind));
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tlist;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for TList<T> generic dynamic list: type substitution with ^T fields,
|
||||
SizeOf built-in, nil/Pointer compatibility with typed pointers, and
|
||||
end-to-end Add/Get/Count codegen. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tokenkindname;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tordereddictionary;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR unit tests for TOrderedDictionary<K,V>: insertion-ordered map.
|
||||
Verifies Add/TryGetValue/ContainsKey/Remove/GetKey/GetValue codegen.
|
||||
Uses Integer keys and Integer values throughout. }
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tqueue;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR unit tests for TQueue<T>: Enqueue/Dequeue/Peek/Clear/Destroy and Grow.
|
||||
Uses Integer as the type parameter throughout. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tset;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR unit tests for TSet<T>: Include/Exclude/Contains/Clear/Destroy and Grow.
|
||||
Uses Integer as the type parameter throughout. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.tstack;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ IR unit tests for TStack<T>: Push/Pop/Peek/Clear/Destroy and Grow.
|
||||
Uses Integer as the type parameter throughout. }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.typetests;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for the 'is' and 'as' type-test operators. }
|
||||
|
||||
interface
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.units;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for unit interface/implementation: parsing, semantic analysis,
|
||||
and code generation. Cross-unit 'uses' loading is out of scope here. }
|
||||
|
||||
|
|
@ -349,10 +347,10 @@ end;
|
|||
procedure TUnitTests.TestSemantic_Unit_SignatureMismatch_ParamCount_RaisesError;
|
||||
begin
|
||||
AnalyseUnitExpectError(
|
||||
'unit Bad;' + #10 +
|
||||
'interface' + #10 +
|
||||
'function Add(A, B: Integer): Integer;' + #10 +
|
||||
'implementation' + #10 +
|
||||
'unit Bad;' + #10 +
|
||||
'interface' + #10 +
|
||||
'function Add(A, B: Integer): Integer;' + #10 +
|
||||
'implementation' + #10 +
|
||||
'function Add(A: Integer): Integer;' + #10 + { wrong: 1 param }
|
||||
'''
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.varparams;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{ Tests for var parameters: pass-by-reference semantics across
|
||||
lexer, parser, semantic analysis, and code generation. }
|
||||
|
||||
|
|
@ -235,10 +233,10 @@ end;
|
|||
procedure TVarParamTests.TestSemantic_VarParam_NonVariable_RaisesError;
|
||||
begin
|
||||
AnalyseExpectError(
|
||||
'program Bad;' + #10 +
|
||||
'procedure Inc(var X: Integer);' + #10 +
|
||||
'begin X := X + 1 end;' + #10 +
|
||||
'begin' + #10 +
|
||||
'program Bad;' + #10 +
|
||||
'procedure Inc(var X: Integer);' + #10 +
|
||||
'begin X := X + 1 end;' + #10 +
|
||||
'begin' + #10 +
|
||||
' Inc(42)' + #10 + { literal, not a variable }
|
||||
'end.');
|
||||
end;
|
||||
|
|
@ -246,11 +244,11 @@ end;
|
|||
procedure TVarParamTests.TestSemantic_VarParam_TypeMismatch_RaisesError;
|
||||
begin
|
||||
AnalyseExpectError(
|
||||
'program Bad;' + #10 +
|
||||
'procedure SetI(var X: Integer);' + #10 +
|
||||
'begin X := 1 end;' + #10 +
|
||||
'var B: Boolean;' + #10 +
|
||||
'begin' + #10 +
|
||||
'program Bad;' + #10 +
|
||||
'procedure SetI(var X: Integer);' + #10 +
|
||||
'begin X := 1 end;' + #10 +
|
||||
'var B: Boolean;' + #10 +
|
||||
'begin' + #10 +
|
||||
' SetI(B)' + #10 + { wrong type }
|
||||
'end.');
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
unit cp.test.vtable;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
unit cp.test.weakref;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
program testbcl;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
blaise.testing,
|
||||
blaise.testing.runner.text;
|
||||
|
|
|
|||
Loading…
Reference in a new issue