~ubuntu-branches/debian/sid/scala/sid

« back to all changes in this revision

Viewing changes to test/files/run/inner-obj-auto.scala

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Mehdi Dogguy, Lucas Satabin, Frank S. Thomas, Emmanuel Bourg
  • Date: 2015-06-05 23:52:59 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20150605235259-wk00vgk83dh8o19g
Tags: 2.10.5-1
* Team upload.

[ Mehdi Dogguy ]
* New upstream release (Closes: #744278).

[ Lucas Satabin ]
* Update patches
* Update the clean target
* Update paths of elements to install
* Update watch file

[ Frank S. Thomas ]
* Remove myself from Uploaders.

[ Emmanuel Bourg ]
* The package has been adopted by the Java Team (Closes: #754935)
* Patched the build to avoid downloading libraries from the Internet
* Replaced the minified JavaScript files with unobfuscated ones
* No longer build scala-partest.jar until diffutils is packaged or replaced
* debian/watch: Fixed the versions matched (x.y.z instead of x.y.z..z)
* debian/rules:
  - Added the missing get-orig-source target (Closes: #724704)
  - Improved the clean target
* debian/control:
  - Build depend on scala (>= 2.10) and bnd
  - Use canonical URLs for the Vcs-* fields
  - Standards-Version updated to 3.9.6 (no changes)
* Switch to debhelper level 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
/* ================================================================================
 
4
         Automatically generated on 2011-05-11. Do Not Edit (unless you have to).
 
5
         (2-level nesting)
 
6
   ================================================================================ */ 
 
7
 
 
8
 
 
9
 
 
10
class Class2_1 {
 
11
  
 
12
  class Class1_2 {
 
13
    var ObjCounter = 0
 
14
    
 
15
    object Obj  { ObjCounter += 1}
 
16
    Obj // one
 
17
 
 
18
    def singleThreadedAccess(x: Any) = {
 
19
      x == Obj
 
20
    }
 
21
 
 
22
    def runTest {
 
23
      try {
 
24
        assert(singleThreadedAccess(Obj))
 
25
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
26
        println("ok")
 
27
      } catch {
 
28
        case e =>  print("failed "); e.printStackTrace()
 
29
      }
 
30
    }
 
31
 
 
32
    def run { runTest }
 
33
  }
 
34
  
 
35
  def run { (new Class1_2).run }
 
36
}
 
37
 
 
38
 
 
39
object Object3_1 {
 
40
  
 
41
  class Class1_2 {
 
42
    var ObjCounter = 0
 
43
    
 
44
    object Obj  { ObjCounter += 1}
 
45
    Obj // one
 
46
 
 
47
    def singleThreadedAccess(x: Any) = {
 
48
      x == Obj
 
49
    }
 
50
 
 
51
    def runTest {
 
52
      try {
 
53
        assert(singleThreadedAccess(Obj))
 
54
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
55
        println("ok")
 
56
      } catch {
 
57
        case e =>  print("failed "); e.printStackTrace()
 
58
      }
 
59
    }
 
60
 
 
61
    def run { runTest }
 
62
  }
 
63
  
 
64
  def run { (new Class1_2).run } // trigger
 
65
}
 
66
 
 
67
 
 
68
trait Trait4_1 {
 
69
  
 
70
  class Class1_2 {
 
71
    var ObjCounter = 0
 
72
    
 
73
    object Obj  { ObjCounter += 1}
 
74
    Obj // one
 
75
 
 
76
    def singleThreadedAccess(x: Any) = {
 
77
      x == Obj
 
78
    }
 
79
 
 
80
    def runTest {
 
81
      try {
 
82
        assert(singleThreadedAccess(Obj))
 
83
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
84
        println("ok")
 
85
      } catch {
 
86
        case e =>  print("failed "); e.printStackTrace()
 
87
      }
 
88
    }
 
89
 
 
90
    def run { runTest }
 
91
  }
 
92
  
 
93
  def run { (new Class1_2).run }
 
94
}
 
95
 
 
96
 
 
97
class Class6_1 {
 
98
  
 
99
  object Object5_2 {
 
100
    var ObjCounter = 0
 
101
    
 
102
    object Obj  { ObjCounter += 1}
 
103
    Obj // one
 
104
 
 
105
    def singleThreadedAccess(x: Any) = {
 
106
      x == Obj
 
107
    }
 
108
 
 
109
    def runTest {
 
110
      try {
 
111
        assert(singleThreadedAccess(Obj))
 
112
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
113
        println("ok")
 
114
      } catch {
 
115
        case e =>  print("failed "); e.printStackTrace()
 
116
      }
 
117
    }
 
118
 
 
119
    def run { runTest } // trigger
 
120
  }
 
121
  
 
122
  def run { Object5_2.run }
 
123
}
 
124
 
 
125
 
 
126
object Object7_1 {
 
127
  
 
128
  object Object5_2 {
 
129
    var ObjCounter = 0
 
130
    
 
131
    object Obj  { ObjCounter += 1}
 
132
    Obj // one
 
133
 
 
134
    def singleThreadedAccess(x: Any) = {
 
135
      x == Obj
 
136
    }
 
137
 
 
138
    def runTest {
 
139
      try {
 
140
        assert(singleThreadedAccess(Obj))
 
141
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
142
        println("ok")
 
143
      } catch {
 
144
        case e =>  print("failed "); e.printStackTrace()
 
145
      }
 
146
    }
 
147
 
 
148
    def run { runTest } // trigger
 
149
  }
 
150
  
 
151
  def run { Object5_2.run } // trigger
 
152
}
 
153
 
 
154
 
 
155
trait Trait8_1 {
 
156
  
 
157
  object Object5_2 {
 
158
    var ObjCounter = 0
 
159
    
 
160
    object Obj  { ObjCounter += 1}
 
161
    Obj // one
 
162
 
 
163
    def singleThreadedAccess(x: Any) = {
 
164
      x == Obj
 
165
    }
 
166
 
 
167
    def runTest {
 
168
      try {
 
169
        assert(singleThreadedAccess(Obj))
 
170
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
171
        println("ok")
 
172
      } catch {
 
173
        case e =>  print("failed "); e.printStackTrace()
 
174
      }
 
175
    }
 
176
 
 
177
    def run { runTest } // trigger
 
178
  }
 
179
  
 
180
  def run { Object5_2.run }
 
181
}
 
182
 
 
183
 
 
184
class Class10_1 {
 
185
  
 
186
  trait Trait9_2 {
 
187
    var ObjCounter = 0
 
188
    
 
189
    object Obj  { ObjCounter += 1}
 
190
    Obj // one
 
191
 
 
192
    def singleThreadedAccess(x: Any) = {
 
193
      x == Obj
 
194
    }
 
195
 
 
196
    def runTest {
 
197
      try {
 
198
        assert(singleThreadedAccess(Obj))
 
199
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
200
        println("ok")
 
201
      } catch {
 
202
        case e =>  print("failed "); e.printStackTrace()
 
203
      }
 
204
    }
 
205
 
 
206
    def run { runTest }
 
207
  }
 
208
  
 
209
  def run { (new Trait9_2 {}).run }
 
210
}
 
211
 
 
212
 
 
213
object Object11_1 {
 
214
  
 
215
  trait Trait9_2 {
 
216
    var ObjCounter = 0
 
217
    
 
218
    object Obj  { ObjCounter += 1}
 
219
    Obj // one
 
220
 
 
221
    def singleThreadedAccess(x: Any) = {
 
222
      x == Obj
 
223
    }
 
224
 
 
225
    def runTest {
 
226
      try {
 
227
        assert(singleThreadedAccess(Obj))
 
228
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
229
        println("ok")
 
230
      } catch {
 
231
        case e =>  print("failed "); e.printStackTrace()
 
232
      }
 
233
    }
 
234
 
 
235
    def run { runTest }
 
236
  }
 
237
  
 
238
  def run { (new Trait9_2 {}).run } // trigger
 
239
}
 
240
 
 
241
 
 
242
trait Trait12_1 {
 
243
  
 
244
  trait Trait9_2 {
 
245
    var ObjCounter = 0
 
246
    
 
247
    object Obj  { ObjCounter += 1}
 
248
    Obj // one
 
249
 
 
250
    def singleThreadedAccess(x: Any) = {
 
251
      x == Obj
 
252
    }
 
253
 
 
254
    def runTest {
 
255
      try {
 
256
        assert(singleThreadedAccess(Obj))
 
257
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
258
        println("ok")
 
259
      } catch {
 
260
        case e =>  print("failed "); e.printStackTrace()
 
261
      }
 
262
    }
 
263
 
 
264
    def run { runTest }
 
265
  }
 
266
  
 
267
  def run { (new Trait9_2 {}).run }
 
268
}
 
269
 
 
270
 
 
271
class Class14_1 {
 
272
  
 
273
  def method13_2 {
 
274
    var ObjCounter = 0
 
275
    
 
276
    object Obj  { ObjCounter += 1}
 
277
    Obj // one
 
278
 
 
279
    def singleThreadedAccess(x: Any) = {
 
280
      x == Obj
 
281
    }
 
282
 
 
283
    def runTest {
 
284
      try {
 
285
        assert(singleThreadedAccess(Obj))
 
286
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
287
        println("ok")
 
288
      } catch {
 
289
        case e =>  print("failed "); e.printStackTrace()
 
290
      }
 
291
    }
 
292
 
 
293
    runTest // trigger
 
294
  }
 
295
  
 
296
  def run { method13_2 }
 
297
}
 
298
 
 
299
 
 
300
object Object15_1 {
 
301
  
 
302
  def method13_2 {
 
303
    var ObjCounter = 0
 
304
    
 
305
    object Obj  { ObjCounter += 1}
 
306
    Obj // one
 
307
 
 
308
    def singleThreadedAccess(x: Any) = {
 
309
      x == Obj
 
310
    }
 
311
 
 
312
    def runTest {
 
313
      try {
 
314
        assert(singleThreadedAccess(Obj))
 
315
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
316
        println("ok")
 
317
      } catch {
 
318
        case e =>  print("failed "); e.printStackTrace()
 
319
      }
 
320
    }
 
321
 
 
322
    runTest // trigger
 
323
  }
 
324
  
 
325
  def run { method13_2 } // trigger
 
326
}
 
327
 
 
328
 
 
329
trait Trait16_1 {
 
330
  
 
331
  def method13_2 {
 
332
    var ObjCounter = 0
 
333
    
 
334
    object Obj  { ObjCounter += 1}
 
335
    Obj // one
 
336
 
 
337
    def singleThreadedAccess(x: Any) = {
 
338
      x == Obj
 
339
    }
 
340
 
 
341
    def runTest {
 
342
      try {
 
343
        assert(singleThreadedAccess(Obj))
 
344
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
345
        println("ok")
 
346
      } catch {
 
347
        case e =>  print("failed "); e.printStackTrace()
 
348
      }
 
349
    }
 
350
 
 
351
    runTest // trigger
 
352
  }
 
353
  
 
354
  def run { method13_2 }
 
355
}
 
356
 
 
357
 
 
358
class Class18_1 {
 
359
  
 
360
  private def method17_2 {
 
361
    var ObjCounter = 0
 
362
    
 
363
    object Obj  { ObjCounter += 1}
 
364
    Obj // one
 
365
 
 
366
    def singleThreadedAccess(x: Any) = {
 
367
      x == Obj
 
368
    }
 
369
 
 
370
    def runTest {
 
371
      try {
 
372
        assert(singleThreadedAccess(Obj))
 
373
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
374
        println("ok")
 
375
      } catch {
 
376
        case e =>  print("failed "); e.printStackTrace()
 
377
      }
 
378
    }
 
379
 
 
380
    runTest // trigger
 
381
  }
 
382
  
 
383
  def run { method17_2 }
 
384
}
 
385
 
 
386
 
 
387
object Object19_1 {
 
388
  
 
389
  private def method17_2 {
 
390
    var ObjCounter = 0
 
391
    
 
392
    object Obj  { ObjCounter += 1}
 
393
    Obj // one
 
394
 
 
395
    def singleThreadedAccess(x: Any) = {
 
396
      x == Obj
 
397
    }
 
398
 
 
399
    def runTest {
 
400
      try {
 
401
        assert(singleThreadedAccess(Obj))
 
402
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
403
        println("ok")
 
404
      } catch {
 
405
        case e =>  print("failed "); e.printStackTrace()
 
406
      }
 
407
    }
 
408
 
 
409
    runTest // trigger
 
410
  }
 
411
  
 
412
  def run { method17_2 } // trigger
 
413
}
 
414
 
 
415
 
 
416
trait Trait20_1 {
 
417
  
 
418
  private def method17_2 {
 
419
    var ObjCounter = 0
 
420
    
 
421
    object Obj  { ObjCounter += 1}
 
422
    Obj // one
 
423
 
 
424
    def singleThreadedAccess(x: Any) = {
 
425
      x == Obj
 
426
    }
 
427
 
 
428
    def runTest {
 
429
      try {
 
430
        assert(singleThreadedAccess(Obj))
 
431
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
432
        println("ok")
 
433
      } catch {
 
434
        case e =>  print("failed "); e.printStackTrace()
 
435
      }
 
436
    }
 
437
 
 
438
    runTest // trigger
 
439
  }
 
440
  
 
441
  def run { method17_2 }
 
442
}
 
443
 
 
444
 
 
445
class Class22_1 {
 
446
  
 
447
  val fun21_2 = () => {
 
448
    var ObjCounter = 0
 
449
    
 
450
    object Obj  { ObjCounter += 1}
 
451
    Obj // one
 
452
 
 
453
    def singleThreadedAccess(x: Any) = {
 
454
      x == Obj
 
455
    }
 
456
 
 
457
    def runTest {
 
458
      try {
 
459
        assert(singleThreadedAccess(Obj))
 
460
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
461
        println("ok")
 
462
      } catch {
 
463
        case e =>  print("failed "); e.printStackTrace()
 
464
      }
 
465
    }
 
466
 
 
467
    runTest // trigger
 
468
  }
 
469
  
 
470
  def run { fun21_2() }
 
471
}
 
472
 
 
473
 
 
474
object Object23_1 {
 
475
  
 
476
  val fun21_2 = () => {
 
477
    var ObjCounter = 0
 
478
    
 
479
    object Obj  { ObjCounter += 1}
 
480
    Obj // one
 
481
 
 
482
    def singleThreadedAccess(x: Any) = {
 
483
      x == Obj
 
484
    }
 
485
 
 
486
    def runTest {
 
487
      try {
 
488
        assert(singleThreadedAccess(Obj))
 
489
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
490
        println("ok")
 
491
      } catch {
 
492
        case e =>  print("failed "); e.printStackTrace()
 
493
      }
 
494
    }
 
495
 
 
496
    runTest // trigger
 
497
  }
 
498
  
 
499
  def run { fun21_2() } // trigger
 
500
}
 
501
 
 
502
 
 
503
trait Trait24_1 {
 
504
  
 
505
  val fun21_2 = () => {
 
506
    var ObjCounter = 0
 
507
    
 
508
    object Obj  { ObjCounter += 1}
 
509
    Obj // one
 
510
 
 
511
    def singleThreadedAccess(x: Any) = {
 
512
      x == Obj
 
513
    }
 
514
 
 
515
    def runTest {
 
516
      try {
 
517
        assert(singleThreadedAccess(Obj))
 
518
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
519
        println("ok")
 
520
      } catch {
 
521
        case e =>  print("failed "); e.printStackTrace()
 
522
      }
 
523
    }
 
524
 
 
525
    runTest // trigger
 
526
  }
 
527
  
 
528
  def run { fun21_2() }
 
529
}
 
530
 
 
531
 
 
532
class Class26_1 {
 
533
  
 
534
  class Class25_2 {
 
535
    { // in primary constructor 
 
536
      var ObjCounter = 0
 
537
      
 
538
      object Obj  { ObjCounter += 1}
 
539
      Obj // one
 
540
 
 
541
      def singleThreadedAccess(x: Any) = {
 
542
        x == Obj
 
543
      }
 
544
 
 
545
      def runTest {
 
546
        try {
 
547
          assert(singleThreadedAccess(Obj))
 
548
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
549
          println("ok")
 
550
        } catch {
 
551
          case e =>  print("failed "); e.printStackTrace()
 
552
        }
 
553
      }
 
554
 
 
555
      runTest // trigger
 
556
    } 
 
557
  }
 
558
  
 
559
  def run { (new Class25_2) }
 
560
}
 
561
 
 
562
 
 
563
object Object27_1 {
 
564
  
 
565
  class Class25_2 {
 
566
    { // in primary constructor 
 
567
      var ObjCounter = 0
 
568
      
 
569
      object Obj  { ObjCounter += 1}
 
570
      Obj // one
 
571
 
 
572
      def singleThreadedAccess(x: Any) = {
 
573
        x == Obj
 
574
      }
 
575
 
 
576
      def runTest {
 
577
        try {
 
578
          assert(singleThreadedAccess(Obj))
 
579
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
580
          println("ok")
 
581
        } catch {
 
582
          case e =>  print("failed "); e.printStackTrace()
 
583
        }
 
584
      }
 
585
 
 
586
      runTest // trigger
 
587
    } 
 
588
  }
 
589
  
 
590
  def run { (new Class25_2) } // trigger
 
591
}
 
592
 
 
593
 
 
594
trait Trait28_1 {
 
595
  
 
596
  class Class25_2 {
 
597
    { // in primary constructor 
 
598
      var ObjCounter = 0
 
599
      
 
600
      object Obj  { ObjCounter += 1}
 
601
      Obj // one
 
602
 
 
603
      def singleThreadedAccess(x: Any) = {
 
604
        x == Obj
 
605
      }
 
606
 
 
607
      def runTest {
 
608
        try {
 
609
          assert(singleThreadedAccess(Obj))
 
610
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
611
          println("ok")
 
612
        } catch {
 
613
          case e =>  print("failed "); e.printStackTrace()
 
614
        }
 
615
      }
 
616
 
 
617
      runTest // trigger
 
618
    } 
 
619
  }
 
620
  
 
621
  def run { (new Class25_2) }
 
622
}
 
623
 
 
624
 
 
625
class Class30_1 {
 
626
  
 
627
  trait Trait29_2 {
 
628
    { // in primary constructor 
 
629
      var ObjCounter = 0
 
630
      
 
631
      object Obj  { ObjCounter += 1}
 
632
      Obj // one
 
633
 
 
634
      def singleThreadedAccess(x: Any) = {
 
635
        x == Obj
 
636
      }
 
637
 
 
638
      def runTest {
 
639
        try {
 
640
          assert(singleThreadedAccess(Obj))
 
641
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
642
          println("ok")
 
643
        } catch {
 
644
          case e =>  print("failed "); e.printStackTrace()
 
645
        }
 
646
      }
 
647
 
 
648
      runTest // trigger
 
649
    } 
 
650
  }
 
651
  
 
652
  def run { (new Trait29_2 {}) }
 
653
}
 
654
 
 
655
 
 
656
object Object31_1 {
 
657
  
 
658
  trait Trait29_2 {
 
659
    { // in primary constructor 
 
660
      var ObjCounter = 0
 
661
      
 
662
      object Obj  { ObjCounter += 1}
 
663
      Obj // one
 
664
 
 
665
      def singleThreadedAccess(x: Any) = {
 
666
        x == Obj
 
667
      }
 
668
 
 
669
      def runTest {
 
670
        try {
 
671
          assert(singleThreadedAccess(Obj))
 
672
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
673
          println("ok")
 
674
        } catch {
 
675
          case e =>  print("failed "); e.printStackTrace()
 
676
        }
 
677
      }
 
678
 
 
679
      runTest // trigger
 
680
    } 
 
681
  }
 
682
  
 
683
  def run { (new Trait29_2 {}) } // trigger
 
684
}
 
685
 
 
686
 
 
687
trait Trait32_1 {
 
688
  
 
689
  trait Trait29_2 {
 
690
    { // in primary constructor 
 
691
      var ObjCounter = 0
 
692
      
 
693
      object Obj  { ObjCounter += 1}
 
694
      Obj // one
 
695
 
 
696
      def singleThreadedAccess(x: Any) = {
 
697
        x == Obj
 
698
      }
 
699
 
 
700
      def runTest {
 
701
        try {
 
702
          assert(singleThreadedAccess(Obj))
 
703
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
704
          println("ok")
 
705
        } catch {
 
706
          case e =>  print("failed "); e.printStackTrace()
 
707
        }
 
708
      }
 
709
 
 
710
      runTest // trigger
 
711
    } 
 
712
  }
 
713
  
 
714
  def run { (new Trait29_2 {}) }
 
715
}
 
716
 
 
717
 
 
718
class Class34_1 {
 
719
  
 
720
  lazy val lzvalue33_2 = {
 
721
    var ObjCounter = 0
 
722
    
 
723
    object Obj  { ObjCounter += 1}
 
724
    Obj // one
 
725
 
 
726
    def singleThreadedAccess(x: Any) = {
 
727
      x == Obj
 
728
    }
 
729
 
 
730
    def runTest {
 
731
      try {
 
732
        assert(singleThreadedAccess(Obj))
 
733
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
734
        println("ok")
 
735
      } catch {
 
736
        case e =>  print("failed "); e.printStackTrace()
 
737
      }
 
738
    }
 
739
 
 
740
    runTest // trigger
 
741
  }
 
742
  
 
743
  def run { lzvalue33_2 }
 
744
}
 
745
 
 
746
 
 
747
object Object35_1 {
 
748
  
 
749
  lazy val lzvalue33_2 = {
 
750
    var ObjCounter = 0
 
751
    
 
752
    object Obj  { ObjCounter += 1}
 
753
    Obj // one
 
754
 
 
755
    def singleThreadedAccess(x: Any) = {
 
756
      x == Obj
 
757
    }
 
758
 
 
759
    def runTest {
 
760
      try {
 
761
        assert(singleThreadedAccess(Obj))
 
762
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
763
        println("ok")
 
764
      } catch {
 
765
        case e =>  print("failed "); e.printStackTrace()
 
766
      }
 
767
    }
 
768
 
 
769
    runTest // trigger
 
770
  }
 
771
  
 
772
  def run { lzvalue33_2 } // trigger
 
773
}
 
774
 
 
775
 
 
776
trait Trait36_1 {
 
777
  
 
778
  lazy val lzvalue33_2 = {
 
779
    var ObjCounter = 0
 
780
    
 
781
    object Obj  { ObjCounter += 1}
 
782
    Obj // one
 
783
 
 
784
    def singleThreadedAccess(x: Any) = {
 
785
      x == Obj
 
786
    }
 
787
 
 
788
    def runTest {
 
789
      try {
 
790
        assert(singleThreadedAccess(Obj))
 
791
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
792
        println("ok")
 
793
      } catch {
 
794
        case e =>  print("failed "); e.printStackTrace()
 
795
      }
 
796
    }
 
797
 
 
798
    runTest // trigger
 
799
  }
 
800
  
 
801
  def run { lzvalue33_2 }
 
802
}
 
803
 
 
804
 
 
805
class Class38_1 {
 
806
  
 
807
  val value37_2 = {
 
808
    var ObjCounter = 0
 
809
    
 
810
    object Obj  { ObjCounter += 1}
 
811
    Obj // one
 
812
 
 
813
    def singleThreadedAccess(x: Any) = {
 
814
      x == Obj
 
815
    }
 
816
 
 
817
    def runTest {
 
818
      try {
 
819
        assert(singleThreadedAccess(Obj))
 
820
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
821
        println("ok")
 
822
      } catch {
 
823
        case e =>  print("failed "); e.printStackTrace()
 
824
      }
 
825
    }
 
826
 
 
827
    runTest // trigger
 
828
  }
 
829
  
 
830
  def run { value37_2 }
 
831
}
 
832
 
 
833
 
 
834
object Object39_1 {
 
835
  
 
836
  val value37_2 = {
 
837
    var ObjCounter = 0
 
838
    
 
839
    object Obj  { ObjCounter += 1}
 
840
    Obj // one
 
841
 
 
842
    def singleThreadedAccess(x: Any) = {
 
843
      x == Obj
 
844
    }
 
845
 
 
846
    def runTest {
 
847
      try {
 
848
        assert(singleThreadedAccess(Obj))
 
849
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
850
        println("ok")
 
851
      } catch {
 
852
        case e =>  print("failed "); e.printStackTrace()
 
853
      }
 
854
    }
 
855
 
 
856
    runTest // trigger
 
857
  }
 
858
  
 
859
  def run { value37_2 } // trigger
 
860
}
 
861
 
 
862
 
 
863
trait Trait40_1 {
 
864
  
 
865
  val value37_2 = {
 
866
    var ObjCounter = 0
 
867
    
 
868
    object Obj  { ObjCounter += 1}
 
869
    Obj // one
 
870
 
 
871
    def singleThreadedAccess(x: Any) = {
 
872
      x == Obj
 
873
    }
 
874
 
 
875
    def runTest {
 
876
      try {
 
877
        assert(singleThreadedAccess(Obj))
 
878
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
879
        println("ok")
 
880
      } catch {
 
881
        case e =>  print("failed "); e.printStackTrace()
 
882
      }
 
883
    }
 
884
 
 
885
    runTest // trigger
 
886
  }
 
887
  
 
888
  def run { value37_2 }
 
889
}
 
890
 
 
891
 
 
892
class Class42_1 {
 
893
  
 
894
  class Class41_2 {
 
895
    var ObjCounter = 0
 
896
    
 
897
    private object Obj  { ObjCounter += 1}
 
898
    Obj // one
 
899
 
 
900
    def singleThreadedAccess(x: Any) = {
 
901
      x == Obj
 
902
    }
 
903
 
 
904
    def runTest {
 
905
      try {
 
906
        assert(singleThreadedAccess(Obj))
 
907
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
908
        println("ok")
 
909
      } catch {
 
910
        case e =>  print("failed "); e.printStackTrace()
 
911
      }
 
912
    }
 
913
 
 
914
    def run { runTest }
 
915
  }
 
916
  
 
917
  def run { (new Class41_2).run }
 
918
}
 
919
 
 
920
 
 
921
object Object43_1 {
 
922
  
 
923
  class Class41_2 {
 
924
    var ObjCounter = 0
 
925
    
 
926
    private object Obj  { ObjCounter += 1}
 
927
    Obj // one
 
928
 
 
929
    def singleThreadedAccess(x: Any) = {
 
930
      x == Obj
 
931
    }
 
932
 
 
933
    def runTest {
 
934
      try {
 
935
        assert(singleThreadedAccess(Obj))
 
936
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
937
        println("ok")
 
938
      } catch {
 
939
        case e =>  print("failed "); e.printStackTrace()
 
940
      }
 
941
    }
 
942
 
 
943
    def run { runTest }
 
944
  }
 
945
  
 
946
  def run { (new Class41_2).run } // trigger
 
947
}
 
948
 
 
949
 
 
950
trait Trait44_1 {
 
951
  
 
952
  class Class41_2 {
 
953
    var ObjCounter = 0
 
954
    
 
955
    private object Obj  { ObjCounter += 1}
 
956
    Obj // one
 
957
 
 
958
    def singleThreadedAccess(x: Any) = {
 
959
      x == Obj
 
960
    }
 
961
 
 
962
    def runTest {
 
963
      try {
 
964
        assert(singleThreadedAccess(Obj))
 
965
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
966
        println("ok")
 
967
      } catch {
 
968
        case e =>  print("failed "); e.printStackTrace()
 
969
      }
 
970
    }
 
971
 
 
972
    def run { runTest }
 
973
  }
 
974
  
 
975
  def run { (new Class41_2).run }
 
976
}
 
977
 
 
978
 
 
979
class Class46_1 {
 
980
  
 
981
  object Object45_2 {
 
982
    var ObjCounter = 0
 
983
    
 
984
    private object Obj  { ObjCounter += 1}
 
985
    Obj // one
 
986
 
 
987
    def singleThreadedAccess(x: Any) = {
 
988
      x == Obj
 
989
    }
 
990
 
 
991
    def runTest {
 
992
      try {
 
993
        assert(singleThreadedAccess(Obj))
 
994
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
995
        println("ok")
 
996
      } catch {
 
997
        case e =>  print("failed "); e.printStackTrace()
 
998
      }
 
999
    }
 
1000
 
 
1001
    def run { runTest } // trigger
 
1002
  }
 
1003
  
 
1004
  def run { Object45_2.run }
 
1005
}
 
1006
 
 
1007
 
 
1008
object Object47_1 {
 
1009
  
 
1010
  object Object45_2 {
 
1011
    var ObjCounter = 0
 
1012
    
 
1013
    private object Obj  { ObjCounter += 1}
 
1014
    Obj // one
 
1015
 
 
1016
    def singleThreadedAccess(x: Any) = {
 
1017
      x == Obj
 
1018
    }
 
1019
 
 
1020
    def runTest {
 
1021
      try {
 
1022
        assert(singleThreadedAccess(Obj))
 
1023
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1024
        println("ok")
 
1025
      } catch {
 
1026
        case e =>  print("failed "); e.printStackTrace()
 
1027
      }
 
1028
    }
 
1029
 
 
1030
    def run { runTest } // trigger
 
1031
  }
 
1032
  
 
1033
  def run { Object45_2.run } // trigger
 
1034
}
 
1035
 
 
1036
 
 
1037
trait Trait48_1 {
 
1038
  
 
1039
  object Object45_2 {
 
1040
    var ObjCounter = 0
 
1041
    
 
1042
    private object Obj  { ObjCounter += 1}
 
1043
    Obj // one
 
1044
 
 
1045
    def singleThreadedAccess(x: Any) = {
 
1046
      x == Obj
 
1047
    }
 
1048
 
 
1049
    def runTest {
 
1050
      try {
 
1051
        assert(singleThreadedAccess(Obj))
 
1052
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1053
        println("ok")
 
1054
      } catch {
 
1055
        case e =>  print("failed "); e.printStackTrace()
 
1056
      }
 
1057
    }
 
1058
 
 
1059
    def run { runTest } // trigger
 
1060
  }
 
1061
  
 
1062
  def run { Object45_2.run }
 
1063
}
 
1064
 
 
1065
 
 
1066
class Class50_1 {
 
1067
  
 
1068
  trait Trait49_2 {
 
1069
    var ObjCounter = 0
 
1070
    
 
1071
    private object Obj  { ObjCounter += 1}
 
1072
    Obj // one
 
1073
 
 
1074
    def singleThreadedAccess(x: Any) = {
 
1075
      x == Obj
 
1076
    }
 
1077
 
 
1078
    def runTest {
 
1079
      try {
 
1080
        assert(singleThreadedAccess(Obj))
 
1081
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1082
        println("ok")
 
1083
      } catch {
 
1084
        case e =>  print("failed "); e.printStackTrace()
 
1085
      }
 
1086
    }
 
1087
 
 
1088
    def run { runTest }
 
1089
  }
 
1090
  
 
1091
  def run { (new Trait49_2 {}).run }
 
1092
}
 
1093
 
 
1094
 
 
1095
object Object51_1 {
 
1096
  
 
1097
  trait Trait49_2 {
 
1098
    var ObjCounter = 0
 
1099
    
 
1100
    private object Obj  { ObjCounter += 1}
 
1101
    Obj // one
 
1102
 
 
1103
    def singleThreadedAccess(x: Any) = {
 
1104
      x == Obj
 
1105
    }
 
1106
 
 
1107
    def runTest {
 
1108
      try {
 
1109
        assert(singleThreadedAccess(Obj))
 
1110
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1111
        println("ok")
 
1112
      } catch {
 
1113
        case e =>  print("failed "); e.printStackTrace()
 
1114
      }
 
1115
    }
 
1116
 
 
1117
    def run { runTest }
 
1118
  }
 
1119
  
 
1120
  def run { (new Trait49_2 {}).run } // trigger
 
1121
}
 
1122
 
 
1123
 
 
1124
trait Trait52_1 {
 
1125
  
 
1126
  trait Trait49_2 {
 
1127
    var ObjCounter = 0
 
1128
    
 
1129
    private object Obj  { ObjCounter += 1}
 
1130
    Obj // one
 
1131
 
 
1132
    def singleThreadedAccess(x: Any) = {
 
1133
      x == Obj
 
1134
    }
 
1135
 
 
1136
    def runTest {
 
1137
      try {
 
1138
        assert(singleThreadedAccess(Obj))
 
1139
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1140
        println("ok")
 
1141
      } catch {
 
1142
        case e =>  print("failed "); e.printStackTrace()
 
1143
      }
 
1144
    }
 
1145
 
 
1146
    def run { runTest }
 
1147
  }
 
1148
  
 
1149
  def run { (new Trait49_2 {}).run }
 
1150
}
 
1151
 
 
1152
 
 
1153
class Class54_1 {
 
1154
  
 
1155
  class Class53_2 {
 
1156
    @volatile var ObjCounter = 0
 
1157
    
 
1158
    object Obj  { ObjCounter += 1}
 
1159
 
 
1160
    def multiThreadedAccess() {
 
1161
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1162
        def run = Obj
 
1163
      })
 
1164
 
 
1165
      threads foreach (_.start())
 
1166
      threads foreach (_.join())
 
1167
    }
 
1168
 
 
1169
    def runTest {
 
1170
      try {
 
1171
        multiThreadedAccess()
 
1172
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1173
        println("ok")
 
1174
      } catch {
 
1175
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1176
      }
 
1177
    }
 
1178
 
 
1179
    def run { runTest }
 
1180
  }
 
1181
  
 
1182
  def run { (new Class53_2).run }
 
1183
}
 
1184
 
 
1185
 
 
1186
object Object55_1 {
 
1187
  
 
1188
  class Class53_2 {
 
1189
    @volatile var ObjCounter = 0
 
1190
    
 
1191
    object Obj  { ObjCounter += 1}
 
1192
 
 
1193
    def multiThreadedAccess() {
 
1194
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1195
        def run = Obj
 
1196
      })
 
1197
 
 
1198
      threads foreach (_.start())
 
1199
      threads foreach (_.join())
 
1200
    }
 
1201
 
 
1202
    def runTest {
 
1203
      try {
 
1204
        multiThreadedAccess()
 
1205
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1206
        println("ok")
 
1207
      } catch {
 
1208
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1209
      }
 
1210
    }
 
1211
 
 
1212
    def run { runTest }
 
1213
  }
 
1214
  
 
1215
  def run { (new Class53_2).run } // trigger
 
1216
}
 
1217
 
 
1218
 
 
1219
trait Trait56_1 {
 
1220
  
 
1221
  class Class53_2 {
 
1222
    @volatile var ObjCounter = 0
 
1223
    
 
1224
    object Obj  { ObjCounter += 1}
 
1225
 
 
1226
    def multiThreadedAccess() {
 
1227
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1228
        def run = Obj
 
1229
      })
 
1230
 
 
1231
      threads foreach (_.start())
 
1232
      threads foreach (_.join())
 
1233
    }
 
1234
 
 
1235
    def runTest {
 
1236
      try {
 
1237
        multiThreadedAccess()
 
1238
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1239
        println("ok")
 
1240
      } catch {
 
1241
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1242
      }
 
1243
    }
 
1244
 
 
1245
    def run { runTest }
 
1246
  }
 
1247
  
 
1248
  def run { (new Class53_2).run }
 
1249
}
 
1250
 
 
1251
 
 
1252
class Class58_1 {
 
1253
  
 
1254
  object Object57_2 {
 
1255
    @volatile var ObjCounter = 0
 
1256
    
 
1257
    object Obj  { ObjCounter += 1}
 
1258
 
 
1259
    def multiThreadedAccess() {
 
1260
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1261
        def run = Obj
 
1262
      })
 
1263
 
 
1264
      threads foreach (_.start())
 
1265
      threads foreach (_.join())
 
1266
    }
 
1267
 
 
1268
    def runTest {
 
1269
      try {
 
1270
        multiThreadedAccess()
 
1271
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1272
        println("ok")
 
1273
      } catch {
 
1274
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1275
      }
 
1276
    }
 
1277
 
 
1278
    def run { runTest } // trigger
 
1279
  }
 
1280
  
 
1281
  def run { Object57_2.run }
 
1282
}
 
1283
 
 
1284
 
 
1285
object Object59_1 {
 
1286
  
 
1287
  object Object57_2 {
 
1288
    @volatile var ObjCounter = 0
 
1289
    
 
1290
    object Obj  { ObjCounter += 1}
 
1291
 
 
1292
    def multiThreadedAccess() {
 
1293
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1294
        def run = Obj
 
1295
      })
 
1296
 
 
1297
      threads foreach (_.start())
 
1298
      threads foreach (_.join())
 
1299
    }
 
1300
 
 
1301
    def runTest {
 
1302
      try {
 
1303
        multiThreadedAccess()
 
1304
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1305
        println("ok")
 
1306
      } catch {
 
1307
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1308
      }
 
1309
    }
 
1310
 
 
1311
    def run { runTest } // trigger
 
1312
  }
 
1313
  
 
1314
  def run { Object57_2.run } // trigger
 
1315
}
 
1316
 
 
1317
 
 
1318
trait Trait60_1 {
 
1319
  
 
1320
  object Object57_2 {
 
1321
    @volatile var ObjCounter = 0
 
1322
    
 
1323
    object Obj  { ObjCounter += 1}
 
1324
 
 
1325
    def multiThreadedAccess() {
 
1326
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1327
        def run = Obj
 
1328
      })
 
1329
 
 
1330
      threads foreach (_.start())
 
1331
      threads foreach (_.join())
 
1332
    }
 
1333
 
 
1334
    def runTest {
 
1335
      try {
 
1336
        multiThreadedAccess()
 
1337
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1338
        println("ok")
 
1339
      } catch {
 
1340
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1341
      }
 
1342
    }
 
1343
 
 
1344
    def run { runTest } // trigger
 
1345
  }
 
1346
  
 
1347
  def run { Object57_2.run }
 
1348
}
 
1349
 
 
1350
 
 
1351
class Class62_1 {
 
1352
  
 
1353
  trait Trait61_2 {
 
1354
    @volatile var ObjCounter = 0
 
1355
    
 
1356
    object Obj  { ObjCounter += 1}
 
1357
 
 
1358
    def multiThreadedAccess() {
 
1359
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1360
        def run = Obj
 
1361
      })
 
1362
 
 
1363
      threads foreach (_.start())
 
1364
      threads foreach (_.join())
 
1365
    }
 
1366
 
 
1367
    def runTest {
 
1368
      try {
 
1369
        multiThreadedAccess()
 
1370
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1371
        println("ok")
 
1372
      } catch {
 
1373
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1374
      }
 
1375
    }
 
1376
 
 
1377
    def run { runTest }
 
1378
  }
 
1379
  
 
1380
  def run { (new Trait61_2 {}).run }
 
1381
}
 
1382
 
 
1383
 
 
1384
object Object63_1 {
 
1385
  
 
1386
  trait Trait61_2 {
 
1387
    @volatile var ObjCounter = 0
 
1388
    
 
1389
    object Obj  { ObjCounter += 1}
 
1390
 
 
1391
    def multiThreadedAccess() {
 
1392
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1393
        def run = Obj
 
1394
      })
 
1395
 
 
1396
      threads foreach (_.start())
 
1397
      threads foreach (_.join())
 
1398
    }
 
1399
 
 
1400
    def runTest {
 
1401
      try {
 
1402
        multiThreadedAccess()
 
1403
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1404
        println("ok")
 
1405
      } catch {
 
1406
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1407
      }
 
1408
    }
 
1409
 
 
1410
    def run { runTest }
 
1411
  }
 
1412
  
 
1413
  def run { (new Trait61_2 {}).run } // trigger
 
1414
}
 
1415
 
 
1416
 
 
1417
trait Trait64_1 {
 
1418
  
 
1419
  trait Trait61_2 {
 
1420
    @volatile var ObjCounter = 0
 
1421
    
 
1422
    object Obj  { ObjCounter += 1}
 
1423
 
 
1424
    def multiThreadedAccess() {
 
1425
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1426
        def run = Obj
 
1427
      })
 
1428
 
 
1429
      threads foreach (_.start())
 
1430
      threads foreach (_.join())
 
1431
    }
 
1432
 
 
1433
    def runTest {
 
1434
      try {
 
1435
        multiThreadedAccess()
 
1436
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1437
        println("ok")
 
1438
      } catch {
 
1439
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1440
      }
 
1441
    }
 
1442
 
 
1443
    def run { runTest }
 
1444
  }
 
1445
  
 
1446
  def run { (new Trait61_2 {}).run }
 
1447
}
 
1448
 
 
1449
 
 
1450
class Class66_1 {
 
1451
  
 
1452
  def method65_2 {
 
1453
    @volatile var ObjCounter = 0
 
1454
    
 
1455
    object Obj  { ObjCounter += 1}
 
1456
 
 
1457
    def multiThreadedAccess() {
 
1458
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1459
        def run = Obj
 
1460
      })
 
1461
 
 
1462
      threads foreach (_.start())
 
1463
      threads foreach (_.join())
 
1464
    }
 
1465
 
 
1466
    def runTest {
 
1467
      try {
 
1468
        multiThreadedAccess()
 
1469
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1470
        println("ok")
 
1471
      } catch {
 
1472
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1473
      }
 
1474
    }
 
1475
 
 
1476
    runTest // trigger
 
1477
  }
 
1478
  
 
1479
  def run { method65_2 }
 
1480
}
 
1481
 
 
1482
 
 
1483
object Object67_1 {
 
1484
  
 
1485
  def method65_2 {
 
1486
    @volatile var ObjCounter = 0
 
1487
    
 
1488
    object Obj  { ObjCounter += 1}
 
1489
 
 
1490
    def multiThreadedAccess() {
 
1491
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1492
        def run = Obj
 
1493
      })
 
1494
 
 
1495
      threads foreach (_.start())
 
1496
      threads foreach (_.join())
 
1497
    }
 
1498
 
 
1499
    def runTest {
 
1500
      try {
 
1501
        multiThreadedAccess()
 
1502
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1503
        println("ok")
 
1504
      } catch {
 
1505
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1506
      }
 
1507
    }
 
1508
 
 
1509
    runTest // trigger
 
1510
  }
 
1511
  
 
1512
  def run { method65_2 } // trigger
 
1513
}
 
1514
 
 
1515
 
 
1516
trait Trait68_1 {
 
1517
  
 
1518
  def method65_2 {
 
1519
    @volatile var ObjCounter = 0
 
1520
    
 
1521
    object Obj  { ObjCounter += 1}
 
1522
 
 
1523
    def multiThreadedAccess() {
 
1524
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1525
        def run = Obj
 
1526
      })
 
1527
 
 
1528
      threads foreach (_.start())
 
1529
      threads foreach (_.join())
 
1530
    }
 
1531
 
 
1532
    def runTest {
 
1533
      try {
 
1534
        multiThreadedAccess()
 
1535
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1536
        println("ok")
 
1537
      } catch {
 
1538
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1539
      }
 
1540
    }
 
1541
 
 
1542
    runTest // trigger
 
1543
  }
 
1544
  
 
1545
  def run { method65_2 }
 
1546
}
 
1547
 
 
1548
 
 
1549
class Class70_1 {
 
1550
  
 
1551
  private def method69_2 {
 
1552
    @volatile var ObjCounter = 0
 
1553
    
 
1554
    object Obj  { ObjCounter += 1}
 
1555
 
 
1556
    def multiThreadedAccess() {
 
1557
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1558
        def run = Obj
 
1559
      })
 
1560
 
 
1561
      threads foreach (_.start())
 
1562
      threads foreach (_.join())
 
1563
    }
 
1564
 
 
1565
    def runTest {
 
1566
      try {
 
1567
        multiThreadedAccess()
 
1568
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1569
        println("ok")
 
1570
      } catch {
 
1571
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1572
      }
 
1573
    }
 
1574
 
 
1575
    runTest // trigger
 
1576
  }
 
1577
  
 
1578
  def run { method69_2 }
 
1579
}
 
1580
 
 
1581
 
 
1582
object Object71_1 {
 
1583
  
 
1584
  private def method69_2 {
 
1585
    @volatile var ObjCounter = 0
 
1586
    
 
1587
    object Obj  { ObjCounter += 1}
 
1588
 
 
1589
    def multiThreadedAccess() {
 
1590
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1591
        def run = Obj
 
1592
      })
 
1593
 
 
1594
      threads foreach (_.start())
 
1595
      threads foreach (_.join())
 
1596
    }
 
1597
 
 
1598
    def runTest {
 
1599
      try {
 
1600
        multiThreadedAccess()
 
1601
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1602
        println("ok")
 
1603
      } catch {
 
1604
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1605
      }
 
1606
    }
 
1607
 
 
1608
    runTest // trigger
 
1609
  }
 
1610
  
 
1611
  def run { method69_2 } // trigger
 
1612
}
 
1613
 
 
1614
 
 
1615
trait Trait72_1 {
 
1616
  
 
1617
  private def method69_2 {
 
1618
    @volatile var ObjCounter = 0
 
1619
    
 
1620
    object Obj  { ObjCounter += 1}
 
1621
 
 
1622
    def multiThreadedAccess() {
 
1623
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1624
        def run = Obj
 
1625
      })
 
1626
 
 
1627
      threads foreach (_.start())
 
1628
      threads foreach (_.join())
 
1629
    }
 
1630
 
 
1631
    def runTest {
 
1632
      try {
 
1633
        multiThreadedAccess()
 
1634
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1635
        println("ok")
 
1636
      } catch {
 
1637
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1638
      }
 
1639
    }
 
1640
 
 
1641
    runTest // trigger
 
1642
  }
 
1643
  
 
1644
  def run { method69_2 }
 
1645
}
 
1646
 
 
1647
 
 
1648
class Class74_1 {
 
1649
  
 
1650
  val fun73_2 = () => {
 
1651
    @volatile var ObjCounter = 0
 
1652
    
 
1653
    object Obj  { ObjCounter += 1}
 
1654
 
 
1655
    def multiThreadedAccess() {
 
1656
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1657
        def run = Obj
 
1658
      })
 
1659
 
 
1660
      threads foreach (_.start())
 
1661
      threads foreach (_.join())
 
1662
    }
 
1663
 
 
1664
    def runTest {
 
1665
      try {
 
1666
        multiThreadedAccess()
 
1667
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1668
        println("ok")
 
1669
      } catch {
 
1670
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1671
      }
 
1672
    }
 
1673
 
 
1674
    runTest // trigger
 
1675
  }
 
1676
  
 
1677
  def run { fun73_2() }
 
1678
}
 
1679
 
 
1680
 
 
1681
object Object75_1 {
 
1682
  
 
1683
  val fun73_2 = () => {
 
1684
    @volatile var ObjCounter = 0
 
1685
    
 
1686
    object Obj  { ObjCounter += 1}
 
1687
 
 
1688
    def multiThreadedAccess() {
 
1689
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1690
        def run = Obj
 
1691
      })
 
1692
 
 
1693
      threads foreach (_.start())
 
1694
      threads foreach (_.join())
 
1695
    }
 
1696
 
 
1697
    def runTest {
 
1698
      try {
 
1699
        multiThreadedAccess()
 
1700
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1701
        println("ok")
 
1702
      } catch {
 
1703
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1704
      }
 
1705
    }
 
1706
 
 
1707
    runTest // trigger
 
1708
  }
 
1709
  
 
1710
  def run { fun73_2() } // trigger
 
1711
}
 
1712
 
 
1713
 
 
1714
trait Trait76_1 {
 
1715
  
 
1716
  val fun73_2 = () => {
 
1717
    @volatile var ObjCounter = 0
 
1718
    
 
1719
    object Obj  { ObjCounter += 1}
 
1720
 
 
1721
    def multiThreadedAccess() {
 
1722
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1723
        def run = Obj
 
1724
      })
 
1725
 
 
1726
      threads foreach (_.start())
 
1727
      threads foreach (_.join())
 
1728
    }
 
1729
 
 
1730
    def runTest {
 
1731
      try {
 
1732
        multiThreadedAccess()
 
1733
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1734
        println("ok")
 
1735
      } catch {
 
1736
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1737
      }
 
1738
    }
 
1739
 
 
1740
    runTest // trigger
 
1741
  }
 
1742
  
 
1743
  def run { fun73_2() }
 
1744
}
 
1745
 
 
1746
 
 
1747
class Class78_1 {
 
1748
  
 
1749
  class Class77_2 {
 
1750
    { // in primary constructor 
 
1751
      @volatile var ObjCounter = 0
 
1752
      
 
1753
      object Obj  { ObjCounter += 1}
 
1754
 
 
1755
      def multiThreadedAccess() {
 
1756
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1757
          def run = Obj
 
1758
        })
 
1759
 
 
1760
        threads foreach (_.start())
 
1761
        threads foreach (_.join())
 
1762
      }
 
1763
 
 
1764
      def runTest {
 
1765
        try {
 
1766
          multiThreadedAccess()
 
1767
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1768
          println("ok")
 
1769
        } catch {
 
1770
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1771
        }
 
1772
      }
 
1773
 
 
1774
      runTest // trigger
 
1775
    } 
 
1776
  }
 
1777
  
 
1778
  def run { (new Class77_2) }
 
1779
}
 
1780
 
 
1781
 
 
1782
object Object79_1 {
 
1783
  
 
1784
  class Class77_2 {
 
1785
    { // in primary constructor 
 
1786
      @volatile var ObjCounter = 0
 
1787
      
 
1788
      object Obj  { ObjCounter += 1}
 
1789
 
 
1790
      def multiThreadedAccess() {
 
1791
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1792
          def run = Obj
 
1793
        })
 
1794
 
 
1795
        threads foreach (_.start())
 
1796
        threads foreach (_.join())
 
1797
      }
 
1798
 
 
1799
      def runTest {
 
1800
        try {
 
1801
          multiThreadedAccess()
 
1802
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1803
          println("ok")
 
1804
        } catch {
 
1805
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1806
        }
 
1807
      }
 
1808
 
 
1809
      runTest // trigger
 
1810
    } 
 
1811
  }
 
1812
  
 
1813
  def run { (new Class77_2) } // trigger
 
1814
}
 
1815
 
 
1816
 
 
1817
trait Trait80_1 {
 
1818
  
 
1819
  class Class77_2 {
 
1820
    { // in primary constructor 
 
1821
      @volatile var ObjCounter = 0
 
1822
      
 
1823
      object Obj  { ObjCounter += 1}
 
1824
 
 
1825
      def multiThreadedAccess() {
 
1826
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1827
          def run = Obj
 
1828
        })
 
1829
 
 
1830
        threads foreach (_.start())
 
1831
        threads foreach (_.join())
 
1832
      }
 
1833
 
 
1834
      def runTest {
 
1835
        try {
 
1836
          multiThreadedAccess()
 
1837
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1838
          println("ok")
 
1839
        } catch {
 
1840
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1841
        }
 
1842
      }
 
1843
 
 
1844
      runTest // trigger
 
1845
    } 
 
1846
  }
 
1847
  
 
1848
  def run { (new Class77_2) }
 
1849
}
 
1850
 
 
1851
 
 
1852
class Class82_1 {
 
1853
  
 
1854
  trait Trait81_2 {
 
1855
    { // in primary constructor 
 
1856
      @volatile var ObjCounter = 0
 
1857
      
 
1858
      object Obj  { ObjCounter += 1}
 
1859
 
 
1860
      def multiThreadedAccess() {
 
1861
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1862
          def run = Obj
 
1863
        })
 
1864
 
 
1865
        threads foreach (_.start())
 
1866
        threads foreach (_.join())
 
1867
      }
 
1868
 
 
1869
      def runTest {
 
1870
        try {
 
1871
          multiThreadedAccess()
 
1872
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1873
          println("ok")
 
1874
        } catch {
 
1875
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1876
        }
 
1877
      }
 
1878
 
 
1879
      runTest // trigger
 
1880
    } 
 
1881
  }
 
1882
  
 
1883
  def run { (new Trait81_2 {}) }
 
1884
}
 
1885
 
 
1886
 
 
1887
object Object83_1 {
 
1888
  
 
1889
  trait Trait81_2 {
 
1890
    { // in primary constructor 
 
1891
      @volatile var ObjCounter = 0
 
1892
      
 
1893
      object Obj  { ObjCounter += 1}
 
1894
 
 
1895
      def multiThreadedAccess() {
 
1896
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1897
          def run = Obj
 
1898
        })
 
1899
 
 
1900
        threads foreach (_.start())
 
1901
        threads foreach (_.join())
 
1902
      }
 
1903
 
 
1904
      def runTest {
 
1905
        try {
 
1906
          multiThreadedAccess()
 
1907
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1908
          println("ok")
 
1909
        } catch {
 
1910
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1911
        }
 
1912
      }
 
1913
 
 
1914
      runTest // trigger
 
1915
    } 
 
1916
  }
 
1917
  
 
1918
  def run { (new Trait81_2 {}) } // trigger
 
1919
}
 
1920
 
 
1921
 
 
1922
trait Trait84_1 {
 
1923
  
 
1924
  trait Trait81_2 {
 
1925
    { // in primary constructor 
 
1926
      @volatile var ObjCounter = 0
 
1927
      
 
1928
      object Obj  { ObjCounter += 1}
 
1929
 
 
1930
      def multiThreadedAccess() {
 
1931
        val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1932
          def run = Obj
 
1933
        })
 
1934
 
 
1935
        threads foreach (_.start())
 
1936
        threads foreach (_.join())
 
1937
      }
 
1938
 
 
1939
      def runTest {
 
1940
        try {
 
1941
          multiThreadedAccess()
 
1942
          assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1943
          println("ok")
 
1944
        } catch {
 
1945
          case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1946
        }
 
1947
      }
 
1948
 
 
1949
      runTest // trigger
 
1950
    } 
 
1951
  }
 
1952
  
 
1953
  def run { (new Trait81_2 {}) }
 
1954
}
 
1955
 
 
1956
 
 
1957
class Class90_1 {
 
1958
  
 
1959
  val value89_2 = {
 
1960
    @volatile var ObjCounter = 0
 
1961
    
 
1962
    object Obj  { ObjCounter += 1}
 
1963
 
 
1964
    def multiThreadedAccess() {
 
1965
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1966
        def run = Obj
 
1967
      })
 
1968
 
 
1969
      threads foreach (_.start())
 
1970
      threads foreach (_.join())
 
1971
    }
 
1972
 
 
1973
    def runTest {
 
1974
      try {
 
1975
        multiThreadedAccess()
 
1976
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
1977
        println("ok")
 
1978
      } catch {
 
1979
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
1980
      }
 
1981
    }
 
1982
 
 
1983
    runTest // trigger
 
1984
  }
 
1985
  
 
1986
  def run { value89_2 }
 
1987
}
 
1988
 
 
1989
 
 
1990
trait Trait92_1 {
 
1991
  
 
1992
  val value89_2 = {
 
1993
    @volatile var ObjCounter = 0
 
1994
    
 
1995
    object Obj  { ObjCounter += 1}
 
1996
 
 
1997
    def multiThreadedAccess() {
 
1998
      val threads = for (i <- 1 to 5) yield new Thread(new Runnable {
 
1999
        def run = Obj
 
2000
      })
 
2001
 
 
2002
      threads foreach (_.start())
 
2003
      threads foreach (_.join())
 
2004
    }
 
2005
 
 
2006
    def runTest {
 
2007
      try {
 
2008
        multiThreadedAccess()
 
2009
        assert(ObjCounter == 1, "multiple instances: " + ObjCounter)
 
2010
        println("ok")
 
2011
      } catch {
 
2012
        case e =>  print("multi-threaded failed "); e.printStackTrace()
 
2013
      }
 
2014
    }
 
2015
 
 
2016
    runTest // trigger
 
2017
  }
 
2018
  
 
2019
  def run { value89_2 }
 
2020
}
 
2021
 
 
2022
 
 
2023
object Test {
 
2024
  def main(args: Array[String]) {
 
2025
    (new Class2_1).run
 
2026
    Object3_1.run
 
2027
    (new Trait4_1 {}).run
 
2028
    (new Class6_1).run
 
2029
    Object7_1.run
 
2030
    (new Trait8_1 {}).run
 
2031
    (new Class10_1).run
 
2032
    Object11_1.run
 
2033
    (new Trait12_1 {}).run
 
2034
    (new Class14_1).run
 
2035
    Object15_1.run
 
2036
    (new Trait16_1 {}).run
 
2037
    (new Class18_1).run
 
2038
    Object19_1.run
 
2039
    (new Trait20_1 {}).run
 
2040
    (new Class22_1).run
 
2041
    Object23_1.run
 
2042
    (new Trait24_1 {}).run
 
2043
    (new Class26_1).run
 
2044
    Object27_1.run
 
2045
    (new Trait28_1 {}).run
 
2046
    (new Class30_1).run
 
2047
    Object31_1.run
 
2048
    (new Trait32_1 {}).run
 
2049
    (new Class34_1).run
 
2050
    Object35_1.run
 
2051
    (new Trait36_1 {}).run
 
2052
    (new Class38_1).run
 
2053
    Object39_1.run
 
2054
    (new Trait40_1 {}).run
 
2055
    (new Class42_1).run
 
2056
    Object43_1.run
 
2057
    (new Trait44_1 {}).run
 
2058
    (new Class46_1).run
 
2059
    Object47_1.run
 
2060
    (new Trait48_1 {}).run
 
2061
    (new Class50_1).run
 
2062
    Object51_1.run
 
2063
    (new Trait52_1 {}).run
 
2064
    (new Class54_1).run
 
2065
    Object55_1.run
 
2066
    (new Trait56_1 {}).run
 
2067
    (new Class58_1).run
 
2068
    Object59_1.run
 
2069
    (new Trait60_1 {}).run
 
2070
    (new Class62_1).run
 
2071
    Object63_1.run
 
2072
    (new Trait64_1 {}).run
 
2073
    (new Class66_1).run
 
2074
    Object67_1.run
 
2075
    (new Trait68_1 {}).run
 
2076
    (new Class70_1).run
 
2077
    Object71_1.run
 
2078
    (new Trait72_1 {}).run
 
2079
    (new Class74_1).run
 
2080
    Object75_1.run
 
2081
    (new Trait76_1 {}).run
 
2082
    (new Class78_1).run
 
2083
    Object79_1.run
 
2084
    (new Trait80_1 {}).run
 
2085
    (new Class82_1).run
 
2086
    Object83_1.run
 
2087
    (new Trait84_1 {}).run
 
2088
    (new Class90_1).run
 
2089
    (new Trait92_1 {}).run
 
2090
  }
 
2091
}
 
2092