[Pharo-project] [update 2.0] #20110
20110 ----- Issue 5977: Rpackage may not handle well method removal in traits http://code.google.com/p/pharo/issues/detail?id=5977 Issue 5997: Classes that implement unsafe equals http://code.google.com/p/pharo/issues/detail?id=5997 Just 3 rpackage tests in yellow now... although this is not the end of history, just the beginning, we are getting closer :)
Ok I know these ones and I will try to allocate some time. stef On Jun 4, 2012, at 7:35 PM, Esteban Lorenzano wrote:
20110 -----
Issue 5977: Rpackage may not handle well method removal in traits http://code.google.com/p/pharo/issues/detail?id=5977
Issue 5997: Classes that implement unsafe equals http://code.google.com/p/pharo/issues/detail?id=5997
Just 3 rpackage tests in yellow now... although this is not the end of history, just the beginning, we are getting closer :)
On Mon, Jun 4, 2012 at 7:35 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
20110 -----
Issue 5977:   Rpackage may not handle well method removal in traits     http://code.google.com/p/pharo/issues/detail?id=5977
Issue 5997:   Classes that implement unsafe equals     http://code.google.com/p/pharo/issues/detail?id=5997
Just 3 rpackage tests in yellow now... although this is not the end of history, just the beginning, we are getting closer :)
Thank you, Tests Guard page updated http://code.google.com/p/pharo/wiki/TestsGuard -- Pavel
On 05 Jun 2012, at 08:55, Pavel Krivanek wrote:
Thank you, Tests Guard page updated http://code.google.com/p/pharo/wiki/TestsGuard
How did TimeTest>>#testGeneralInquiries get in there ? I looked at it and I can't imagine why this would randomly fail on Mac OS X. But everything is possible. Maybe something with time zones, but as far as I can see, both date parsing and date creation from seconds use the local time zone. As for the test code itself, testGeneralInquiries | now d t dt | now := self timeClass dateAndTimeNow. self assert: now size = 2; assert: now last <= self timeClass now. self should: [ self timeClass timeWords ] raise: MessageNotUnderstood. d := '2 June 1973' asDate. t := '4:02:47 am' asTime. dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567). self assert: dt = {d. t.}. The middle part is a GREAT example of a useful unit test⦠Sven
I have no idea... but you can try to reproduce. The build is still saved: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0/118/ Here is the SUnit report: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0-Tests/106/tes... -- Pavel On Tue, Jun 5, 2012 at 9:34 AM, Sven Van Caekenberghe <sven@beta9.be> wrote:
On 05 Jun 2012, at 08:55, Pavel Krivanek wrote:
Thank you, Tests Guard page updated http://code.google.com/p/pharo/wiki/TestsGuard
How did TimeTest>>#testGeneralInquiries get in there ?
I looked at it and I can't imagine why this would randomly fail on Mac OS X. But everything is possible.
Maybe something with time zones, but as far as I can see, both date parsing and date creation from seconds use the local time zone.
As for the test code itself,
testGeneralInquiries     | now d t dt |
    now  := self timeClass dateAndTimeNow.     self         assert: now size = 2;         assert: now last <= self timeClass now.
    self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
    d := '2 June 1973' asDate.     t := '4:02:47 am' asTime.     dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567).     self         assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
Sven
Hi Pavel, On 05 Jun 2012, at 09:45, Pavel Krivanek wrote:
I have no idea... but you can try to reproduce. The build is still saved: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0/118/ Here is the SUnit report: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0-Tests/106/tes...
But there it says the failure is on Linux. So I took that image and the latest CogVM from the download page and tried on one of our Ubuntu 12.04 64-bit machines. I can't make the test fail, I even ran the full test suite. So, not reproduceable from my point of view. Sven
On Tue, Jun 5, 2012 at 10:58 AM, Sven Van Caekenberghe <sven@beta9.be> wrote:
Hi Pavel,
On 05 Jun 2012, at 09:45, Pavel Krivanek wrote:
I have no idea... but you can try to reproduce. The build is still saved: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0/118/ Here is the SUnit report: https://ci.lille.inria.fr/pharo/view/Pharo%202.0/job/Pharo-2.0-Tests/106/tes...
But there it says the failure is on Linux.
ahhh, sorry, I changed the page.
So I took that image and the latest CogVM from the download page and tried on one of our Ubuntu 12.04 64-bit machines.
I can't make the test fail, I even ran the full test suite.
So, not reproduceable from my point of view.
Sven
Well, we will se if it will fail again in future. -- Pavel
testGeneralInquiries | now d t dt |
now := self timeClass dateAndTimeNow. self assert: now size = 2; assert: now last <= self timeClass now.
self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
d := '2 June 1973' asDate. t := '4:02:47 am' asTime. dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567). self assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
On Tue, Jun 5, 2012 at 11:55 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
testGeneralInquiries    | now d t dt |
   now  := self timeClass dateAndTimeNow.    self        assert: now size = 2;        assert: now last <= self timeClass now.
   self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
   d := '2 June 1973' asDate.    t := '4:02:47 am' asTime.    dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567).    self        assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
I will write a paper on automatic negative test generation. Who wants to join? :-) -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
On Tue, Jun 5, 2012 at 5:04 PM, Damien Cassou <damien.cassou@gmail.com> wrote:
On Tue, Jun 5, 2012 at 11:55 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
testGeneralInquiries    | now d t dt |
   now  := self timeClass dateAndTimeNow.    self        assert: now size = 2;        assert: now last <= self timeClass now.
   self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
   d := '2 June 1973' asDate.    t := '4:02:47 am' asTime.    dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567).    self        assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
I will write a paper on automatic negative test generation. Who wants to join? :-)
You can even write a program that write a paper about negative tests generation ;-) -- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Every DSL ends up being Smalltalk http://doesnotunderstand.org/
Haha, very funny. It's a good thing there are so many jokes hidden inside the image. We could add a couple/many more: self deny: 1 = 2. self deny: 1 = -1. self deny: (4 / 2) = 3 self shouldnt: [ 1 / 2 ] raise: ZeroDivide ;-) On 05 Jun 2012, at 12:10, Serge Stinckwich wrote:
On Tue, Jun 5, 2012 at 5:04 PM, Damien Cassou <damien.cassou@gmail.com> wrote:
On Tue, Jun 5, 2012 at 11:55 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
testGeneralInquiries | now d t dt |
now := self timeClass dateAndTimeNow. self assert: now size = 2; assert: now last <= self timeClass now.
self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
d := '2 June 1973' asDate. t := '4:02:47 am' asTime. dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567). self assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
I will write a paper on automatic negative test generation. Who wants to join? :-)
You can even write a program that write a paper about negative tests generation ;-)
-- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Every DSL ends up being Smalltalk http://doesnotunderstand.org/
2012/6/5 Sven Van Caekenberghe <sven@beta9.be>:
Haha, very funny.
It's a good thing there are so many jokes hidden inside the image.
We could add a couple/many more:
self deny: 1 = 2. self deny: 1 = -1. self deny: (4 / 2) = 3 self shouldnt: [ 1 / 2 ] raise: ZeroDivide
;-)
Yes it's laughable. However, I recently hacked Intger/Fraction to speed up mixed operations and guess what... once you know the miserable error's we can make... Nicolas
On 05 Jun 2012, at 12:10, Serge Stinckwich wrote:
On Tue, Jun 5, 2012 at 5:04 PM, Damien Cassou <damien.cassou@gmail.com> wrote:
On Tue, Jun 5, 2012 at 11:55 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
testGeneralInquiries    | now d t dt |
   now  := self timeClass dateAndTimeNow.    self        assert: now size = 2;        assert: now last <= self timeClass now.
   self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
   d := '2 June 1973' asDate.    t := '4:02:47 am' asTime.    dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567).    self        assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
I will write a paper on automatic negative test generation. Who wants to join? :-)
You can even write a program that write a paper about negative tests generation ;-)
-- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Every DSL ends up being Smalltalk http://doesnotunderstand.org/
To illustrate that these dumb tests that don't look that interesting might sometimes help, here is how I changed Integer>>/ aNumber "Refer to the comment in Number / " | quoRem | aNumber isInteger ifTrue: [quoRem := self digitDiv: aNumber abs "*****I've added abs here*****" neg: self negative ~~ aNumber negative. (quoRem at: 2) = 0 ifTrue: [^ (quoRem at: 1) normalize] ifFalse: [^ (Fraction numerator: self denominator: aNumber) reduced]]. aNumber isFraction ifTrue: [| n d | n := self // (d := self gcd: aNumber numerator). d := aNumber numerator // d. ^d = 1 ifTrue: [n * aNumber denominator * d] ifFalse: [Fraction numerator: n * aNumber denominator denominator: d]]. ^ aNumber adaptToInteger: self andSend: #/ But hey, we can't fail on such trivial method, can we? Unless... maybe the cyclomatic complexity isn't that low after all... Please, could you tell me where the error was ? Nicolas 2012/6/5 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2012/6/5 Sven Van Caekenberghe <sven@beta9.be>:
Haha, very funny.
It's a good thing there are so many jokes hidden inside the image.
We could add a couple/many more:
self deny: 1 = 2. self deny: 1 = -1. self deny: (4 / 2) = 3 self shouldnt: [ 1 / 2 ] raise: ZeroDivide
;-)
Yes it's laughable. However, I recently hacked Intger/Fraction to speed up mixed operations and guess what... once you know the miserable error's we can make...
Nicolas
On 05 Jun 2012, at 12:10, Serge Stinckwich wrote:
On Tue, Jun 5, 2012 at 5:04 PM, Damien Cassou <damien.cassou@gmail.com> wrote:
On Tue, Jun 5, 2012 at 11:55 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
testGeneralInquiries    | now d t dt |
   now  := self timeClass dateAndTimeNow.    self        assert: now size = 2;        assert: now last <= self timeClass now.
   self should: [ self timeClass timeWords ] raise: MessageNotUnderstood.
   d := '2 June 1973' asDate.    t := '4:02:47 am' asTime.    dt := self timeClass dateAndTimeFromSeconds: (2285280000 + 14567).    self        assert: dt = {d. t.}.
The middle part is a GREAT example of a useful unit testâ¦
that's called a negative test :D, assume what possible could fail in the universe and test for it :D
I will write a paper on automatic negative test generation. Who wants to join? :-)
You can even write a program that write a paper about negative tests generation ;-)
-- Serge Stinckwich UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam Every DSL ends up being Smalltalk http://doesnotunderstand.org/
participants (8)
-
Camillo Bruni -
Damien Cassou -
Esteban Lorenzano -
Nicolas Cellier -
Pavel Krivanek -
Serge Stinckwich -
Stéphane Ducasse -
Sven Van Caekenberghe