root/trunk/ProjectFortress/tests/atomic2.fss

Revision 3550, 1.3 KB (checked in by sukyoungryu, 9 months ago)

[copyright] Fixed the copyright notices.

Line 
1(********************************************************************************
2    Copyright 2009 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16********************************************************************************)
17
18component atomic2
19
20export Executable
21
22run():()=do
23   var count1 : ZZ32 = 0
24   var count2 : ZZ32 = 1000
25   var count3 : ZZ32 = 10000
26   var count4 : ZZ32 = 100000
27   for i <- 1#500 do
28      atomic do count1+= 1; count2+=2; count3+=3; count4+=4 end
29   end
30   if count1=/=500 OR count2=/=2000 OR count3=/=11500 OR count4=/=102000 then
31     println("FAIL: count1 = " count1)
32     println("FAIL: count2 = " count2)
33     println("FAIL: count3 = " count3)
34     println("FAIL: count4 = " count4)
35   else
36   println("SUCCESS")
37   end
38end
39end
Note: See TracBrowser for help on using the browser.