The Trunk: KernelTests-nice.361.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-nice.361.mcz

commits-2
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.361.mcz

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

Name: KernelTests-nice.361
Author: nice
Time: 3 May 2019, 10:46:16.703499 pm
UUID: 8630d99a-ddab-4914-96bf-7f06d1899cee
Ancestors: KernelTests-pre.360

Apply refactorings of Kernel-nice.1224

=============== Diff against KernelTests-pre.360 ===============

Item was changed:
  ----- Method: LargePositiveIntegerTest>>testDigitDiv (in category 'tests') -----
  testDigitDiv
  | a b q r qr ap bp |
  ap := self x23kbits.
  bp := self x13kbits.
+ self assert: (ap digitDivSplit: bp) = ((ap digitDiv: bp neg: false) collect: #normalize).
- self assert: (ap recursiveDigitDiv: bp) = ((ap primDigitDiv: bp neg: false) collect: #normalize).
  #(#yourself #negated) do: [:opa |
  #(#yourself #negated) do: [:opb |
  a := ap perform: opa.
  b := bp perform: opb.
  qr := a digitDiv: b neg: opa ~~ opb.
  q := qr first normalize.
  r := qr last normalize.
  self assert: q * b + r = a.
  self assert: r abs < b abs.
  self assert: a positive ==> r positive.
  self assert: a negative ==> (r negative | r isZero)]]
  !

Item was changed:
  ----- Method: LargePositiveIntegerTest>>testFastMultiply (in category 'tests') -----
  testFastMultiply
  | a b ab ap bp |
  ap := self x92kbits.
  bp := self x106kbits.
  #(#yourself #negated) do: [:opa |
  #(#yourself #negated) do: [:opb |
  a := ap perform: opa.
  b := bp perform: opb.
  ab := a * b.
+ self assert: (a multiplyByInteger: b) = ab.
+ self assert: (a digitMultiply: b neg: a negative ~~ b negative) = ab.
+ self assert: (a digitMul22: b) = ab.
+ self assert: (a digitMul23: b) = ab.
+ self assert: (a digitMul33: b) = ab]]!
- self assert: (a fastMultiply: b) = ab.
- self assert: (a karatsubaTimes: b) = ab.
- self assert: (a toom3Times: b) = ab]]!

Item was changed:
  ----- Method: LargePositiveIntegerTest>>testSquared (in category 'tests') -----
  testSquared
 
  | large ref |
  large := self x23kbits.
  ref := large * large.
  self assert: ref = large squared.
+ self assert: ref = large squaredByHalf.
+ self assert: ref = large squaredByThird.
+ self assert: ref = large squaredByFourth.!
- self assert: ref = large squaredKaratsuba.
- self assert: ref = large squaredToom3.
- self assert: ref = large squaredToom4.!