diff --git a/.gitattributes b/.gitattributes index 32b8412752..672eac5ede 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10939,9 +10939,9 @@ tests/test/lcpref.inc svneol=native#text/plain tests/test/library/testdll.pp svneol=native#text/plain tests/test/library/testdll2.pp svneol=native#text/plain tests/test/library/tlib1a.pp svneol=native#text/plain -tests/test/library/tlib1a2.pp svneol=native#text/plain tests/test/library/tlib1b.pp svneol=native#text/plain -tests/test/library/tlib2b.pp svneol=native#text/plain +tests/test/library/tlib1c.pp svneol=native#text/plain +tests/test/library/tlib1d.pp svneol=native#text/plain tests/test/library/tlib3a.pp svneol=native#text/plain tests/test/library/tlib3b.pp svneol=native#text/plain tests/test/library/tlib3c.pp svneol=native#text/plain diff --git a/tests/test/library/tlib1a2.pp b/tests/test/library/tlib1a2.pp deleted file mode 100644 index e90e331114..0000000000 --- a/tests/test/library/tlib1a2.pp +++ /dev/null @@ -1,16 +0,0 @@ -{ %target=win32,win64 } -{ %needlibrary } -{ %norun } -{ %neededafter } - -library tlib1a2; - - procedure p(var a : dword); - begin - a:=2; - end; - - exports p; - -begin -end. diff --git a/tests/test/library/tlib1b.pp b/tests/test/library/tlib1b.pp index dfd1132061..e90e331114 100644 --- a/tests/test/library/tlib1b.pp +++ b/tests/test/library/tlib1b.pp @@ -1,27 +1,16 @@ { %target=win32,win64 } { %needlibrary } +{ %norun } +{ %neededafter } -{ Checks that the two functions with the same exported name 'p' - are each loaded correctly. } -procedure p(var a : dword);external 'tlib1a' name 'p'; -procedure p2(var a : dword);external 'tlib1a2' name 'p'; +library tlib1a2; -var - a : dword; -begin - a:=0; - p(a); - if a <> 1 then - halt(1); - a:=0; - p2(a); - if a <> 2 then + procedure p(var a : dword); begin - if a=1 then - writeln('Error: Calling tlib1a library p function again instead ', - 'of tlib1a2 p function.'); - halt(2); + a:=2; end; - writeln('ok'); + exports p; + +begin end. diff --git a/tests/test/library/tlib1c.pp b/tests/test/library/tlib1c.pp new file mode 100644 index 0000000000..b145606881 --- /dev/null +++ b/tests/test/library/tlib1c.pp @@ -0,0 +1,27 @@ +{ %target=win32,win64 } +{ %needlibrary } + +{ Checks that the two functions with the same exported name 'p' + are each loaded correctly. } +procedure p(var a : dword);external 'tlib1a' name 'p'; +procedure p2(var a : dword);external 'tlib1b' name 'p'; + +var + a : dword; +begin + a:=0; + p(a); + if a <> 1 then + halt(1); + a:=0; + p2(a); + if a <> 2 then + begin + if a=1 then + writeln('Error: Calling tlib1a library p function again instead ', + 'of tlib1b p function.'); + halt(2); + end; + + writeln('ok'); +end. diff --git a/tests/test/library/tlib2b.pp b/tests/test/library/tlib1d.pp similarity index 84% rename from tests/test/library/tlib2b.pp rename to tests/test/library/tlib1d.pp index c27ab80dba..60202842f8 100644 --- a/tests/test/library/tlib2b.pp +++ b/tests/test/library/tlib1d.pp @@ -7,7 +7,7 @@ uses { Checks that the two functions with the same exported name 'p' are each loaded correctly. } procedure p(var a : dword);external 'tlib1a' name 'p'; -procedure p2(var a : dword);external 'tlib1a2' name 'p'; +procedure p2(var a : dword);external 'tlib1b' name 'p'; var a : dword; @@ -22,7 +22,7 @@ begin begin if a=1 then writeln('Error: Calling tlib1a library p function again instead ', - 'of tlib1a2 p function.'); + 'of tlib1b p function.'); halt(2); end; @@ -35,7 +35,7 @@ begin begin if a=1 then writeln('Error: Calling tlib1a library p function via ulib2b unit again instead ', - 'of tlib1a2 p function.'); + 'of tlib1b p function.'); halt(2); end; @@ -48,7 +48,7 @@ begin begin if a=1 then writeln('Error: Calling tlib1a library p function via ulib2a unit again instead ', - 'of tlib1a2 p function.'); + 'of tlib1b p function.'); halt(2); end; @@ -57,7 +57,7 @@ begin begin if a=1 then writeln('Error: Calling tlib1a library p function via ulib2a unit again instead ', - 'of tlib1a2 p function.'); + 'of tlib1b p function.'); halt(2); end; diff --git a/tests/test/library/ulib2a.pp b/tests/test/library/ulib2a.pp index be8f99f336..d4d61c23c4 100644 --- a/tests/test/library/ulib2a.pp +++ b/tests/test/library/ulib2a.pp @@ -8,7 +8,7 @@ interface { Checks that the two functions with the same exported name 'p' are each loaded correctly. } procedure p(var a : dword);external 'tlib1a' name 'p'; -procedure p2(var a : dword);external 'tlib1a2' name 'p'; +procedure p2(var a : dword);external 'tlib1b' name 'p'; procedure p3(var a : dword);external 'tlib1a' name 'p'; implementation diff --git a/tests/test/library/ulib2b.pp b/tests/test/library/ulib2b.pp index 82228d85b4..fa56d01de3 100644 --- a/tests/test/library/ulib2b.pp +++ b/tests/test/library/ulib2b.pp @@ -8,7 +8,7 @@ interface { Checks that the two functions with the same exported name 'p' are each loaded correctly. } procedure p(var a : dword);external 'tlib1a' name 'p'; -procedure p2(var a : dword);external 'tlib1a2' name 'p'; +procedure p2(var a : dword);external 'tlib1b' name 'p'; implementation