diff --git a/tests/test/thlp5.pp b/tests/test/thlp5.pp
index 2fb29775e1..cfd319229c 100644
--- a/tests/test/thlp5.pp
+++ b/tests/test/thlp5.pp
@@ -4,7 +4,7 @@
 program thlp5;
 
 {$ifdef fpc}
-  {$modeswitch objfpc}
+  {$mode objfpc}
 {$endif}
 
 uses
diff --git a/tests/test/thlp6.pp b/tests/test/thlp6.pp
index 2885ea5e4d..b549251099 100644
--- a/tests/test/thlp6.pp
+++ b/tests/test/thlp6.pp
@@ -4,7 +4,7 @@
 program thlp6;
 
 {$ifdef fpc}
-  {$modeswitch objfpc}
+  {$mode objfpc}
 {$endif}
 
 uses