Browse Source

* pretty basic InterlockedCompareExchange test

git-svn-id: trunk@6799 -
florian 18 years ago
parent
commit
8ec185eb10
2 changed files with 11 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 10 0
      tests/test/units/system/interlocked1.pp

+ 1 - 0
.gitattributes

@@ -6945,6 +6945,7 @@ tests/test/units/sharemem/test1.pp svneol=native#text/plain
 tests/test/units/softfpu/sfttst.pp svneol=native#text/plain
 tests/test/units/softfpu/sfttst.pp svneol=native#text/plain
 tests/test/units/strings/tstrcopy.pp svneol=native#text/plain
 tests/test/units/strings/tstrcopy.pp svneol=native#text/plain
 tests/test/units/strings/tstrings1.pp svneol=native#text/plain
 tests/test/units/strings/tstrings1.pp svneol=native#text/plain
+tests/test/units/system/interlocked1.pp svneol=native#text/plain
 tests/test/units/system/tabs.pp svneol=native#text/plain
 tests/test/units/system/tabs.pp svneol=native#text/plain
 tests/test/units/system/targs.pp svneol=native#text/plain
 tests/test/units/system/targs.pp svneol=native#text/plain
 tests/test/units/system/tassert1.pp svneol=native#text/plain
 tests/test/units/system/tassert1.pp svneol=native#text/plain

+ 10 - 0
tests/test/units/system/interlocked1.pp

@@ -0,0 +1,10 @@
+var
+  target : longint;
+
+begin
+  target:=1234;
+  InterLockedCompareExchange(target,4321,1234);
+  if target<>4321 then
+    halt(1);
+  writeln('ok');
+end.