My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

import jconch.testing.Assert
import java.util.concurrent.Callable

Assert.assertSynchronized(
{
def target = new Vector() //fail if ArrayList
return [
{ (0..1000).each { target.add(new Object()) } } as Callable,
{ (0..1000).each { target.add(new Object()) } } as Callable,
]
} as Callable
)

println "Success"

Change log

r132 by HamletDRC on Jan 19, 2009   Diff
Added Assert example in Groovy
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 349 bytes, 16 lines
Powered by Google Project Hosting