The Trunk: KernelTests-eem.319.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

The Trunk: KernelTests-eem.319.mcz

Eliot Miranda uploaded a new version of KernelTests to project The Trunk:

==================== Summary ====================

Name: KernelTests-eem.319
Author: eem
Time: 17 March 2017, 8:20:30.333051 am
UUID: e737972f-6877-49e9-8a27-e30ef95fd3eb
Ancestors: KernelTests-tonyg.318

Make the testOutOfMemorySignal observe the reality; basicNew: is entitled to fail with #'invalid argument' when given other than a SmallInteger.

=============== Diff against KernelTests-tonyg.318 ===============

Item was changed:
  ----- Method: AllocationTest>>testOutOfMemorySignal (in category 'tests') -----
+ "Ensure that OutOfMemory is signaled eventually"
- "Ensure that OOM is signaled eventually"
  | sz |
  self setFreeSpaceLimitOf: 1024 * 1024 * 1024 * (Smalltalk wordSize = 8
  ifTrue: [4]
  ifFalse: [1.5])
  [sz := 512*1024*1024. "work around the 1GB alloc bug"
+ self should: [(1 to: 2000) collect: [:i| Array new: sz]] raise: OutOfMemory].
- self should:[(1 to: 2000) collect:[:i| Array new: sz]] raise: OutOfMemory].
+ "Call me when this test fails, I want your machine" "I think they mean succeeds ;-) eem"
+ "Current (2017) Spur VMs fail new: & basicNew: with #'bad argument' if given other than a non-negative SmallInteger."
- "Call me when this test fails, I want your machine"
  sz := 1024*1024*1024*1024.
+ self should: [Array new: sz]
+ raise: OutOfMemory, Error
+ withExceptionDo:
+ [:ex|
+ ex class == Error ifTrue:
+ [self assert: [ex messageText includesSubString: 'basicNew: with invalid argument']]]!
- self should:[Array new: sz] raise: OutOfMemory!