瀏覽代碼

* pretty basic InterlockedCompareExchange test

git-svn-id: trunk@6799 -
florian 18 年之前
父節點
當前提交
8ec185eb10
共有 2 個文件被更改,包括 11 次插入0 次删除
  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.