From c9eb2f8bab30e66c465fa0f2293c35dea446a272 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:05 +0300 Subject: [PATCH 001/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 + .../20160928160607189/besouroEpisodes.txt | 0 .besouro/20160928160607189/disagreements.txt | 0 .../randomHeuristicEpisodes.txt | 0 .besouro/20160928160607189/userComments.txt | 0 .besouro/20160928160607189/zorroEpisodes.txt | 0 .classpath | 16 ++-- .gitattributes | 34 +++---- .gitignore | 96 +++++++++---------- .project | 34 +++---- src/RomanNumerals.java | 16 ++-- tests/TestRomanNumerals.java | 27 +++--- 12 files changed, 116 insertions(+), 110 deletions(-) create mode 100644 .besouro/20160928160607189/actions.txt create mode 100644 .besouro/20160928160607189/besouroEpisodes.txt create mode 100644 .besouro/20160928160607189/disagreements.txt create mode 100644 .besouro/20160928160607189/randomHeuristicEpisodes.txt create mode 100644 .besouro/20160928160607189/userComments.txt create mode 100644 .besouro/20160928160607189/zorroEpisodes.txt diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt new file mode 100644 index 0000000..3499a75 --- /dev/null +++ b/.besouro/20160928160607189/actions.txt @@ -0,0 +1,3 @@ +FileOpenedAction 1475067967483 TestRomanNumerals.java 171 1 0 0 +RefactoringAction 1475067976324 TestRomanNumerals.java ADD RomanNumerals rn FIELD +EditAction 1475068025092 TestRomanNumerals.java 258 1 2 1 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160607189/disagreements.txt b/.besouro/20160928160607189/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160607189/userComments.txt b/.besouro/20160928160607189/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.classpath b/.classpath index b85cb56..b49ab80 100644 --- a/.classpath +++ b/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/.gitattributes b/.gitattributes index bdb0cab..7351b55 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,17 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index daae7a9..0046b29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,48 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk -/bin/ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +/bin/ diff --git a/.project b/.project index ae0e541..b749631 100644 --- a/.project +++ b/.project @@ -1,17 +1,17 @@ - - - RomanNumerals - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + RomanNumerals + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 20904f0..19a4cf5 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,8 +1,8 @@ - -public class RomanNumerals { - public int convertToInteger(String romanNum) { - // To be Implemented - return 0; - - } -} + +public class RomanNumerals { + public int convertToInteger(String romanNum) { + // To be Implemented + return 0; + + } +} diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5d1de75..0d5fc15 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,12 +1,15 @@ -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TestRomanNumerals { - - @Test - public void test() { - fail("Not yet implemented"); - } - -} +import static org.junit.Assert.*; + +import org.junit.Test; + +public class TestRomanNumerals { + + RomanNumerals rn = new RomanNumerals(); + + @Test + public void test_I_1() { + int number = rn.convertToInteger("I"); + assertEquals(1, number); + } + +} From 3699fdef2ceaaaf0df6f61b96528f6c3f6a7887a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:19 +0300 Subject: [PATCH 002/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 3499a75..2860902 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -1,3 +1,6 @@ FileOpenedAction 1475067967483 TestRomanNumerals.java 171 1 0 0 RefactoringAction 1475067976324 TestRomanNumerals.java ADD RomanNumerals rn FIELD EditAction 1475068025092 TestRomanNumerals.java 258 1 2 1 +UnitTestCaseAction 1475068031067 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068031071 TestRomanNumerals.java FAIL +EditAction 1475068039268 RomanNumerals.java 101 1 1 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 19a4cf5..f2774f6 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,8 +1,6 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - // To be Implemented - return 0; - + return 1; } } From ccc7ccefd57abb0771e93a15135344c13ddce98d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:35 +0300 Subject: [PATCH 003/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 2860902..8e82524 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -4,3 +4,8 @@ EditAction 1475068025092 TestRomanNumerals.java 258 1 2 1 UnitTestCaseAction 1475068031067 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068031071 TestRomanNumerals.java FAIL EditAction 1475068039268 RomanNumerals.java 101 1 1 0 +UnitTestCaseAction 1475068041612 TestRomanNumerals.java OK +UnitTestSessionAction 1475068041613 TestRomanNumerals.java OK +RefactoringAction 1475068049093 TestRomanNumerals.java ADD void test_I_1()/2 METHOD +RefactoringAction 1475068052124 TestRomanNumerals.java RENAME test_I_1()/2=>void test_II_2() METHOD +EditAction 1475068055372 TestRomanNumerals.java 372 2 4 2 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index e69de29..b814c96 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -0,0 +1,2 @@ +1475068041613 test-addition 2 74 true +1475068041614 test-addition 1 74 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index e69de29..44e9270 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475068041613 test-addition 2 74 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index e69de29..44e9270 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -0,0 +1 @@ +1475068041613 test-addition 2 74 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 0d5fc15..3aaefed 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,5 +11,11 @@ public void test_I_1() { int number = rn.convertToInteger("I"); assertEquals(1, number); } + + @Test + public void test_II_2() { + int number = rn.convertToInteger("II"); + assertEquals(2, number); + } } From 8c6718330b3bc4705a4aad8c0b2a63524515e3af Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:08:01 +0300 Subject: [PATCH 004/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 8e82524..cf5b711 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -9,3 +9,6 @@ UnitTestSessionAction 1475068041613 TestRomanNumerals.java OK RefactoringAction 1475068049093 TestRomanNumerals.java ADD void test_I_1()/2 METHOD RefactoringAction 1475068052124 TestRomanNumerals.java RENAME test_I_1()/2=>void test_II_2() METHOD EditAction 1475068055372 TestRomanNumerals.java 372 2 4 2 +UnitTestCaseAction 1475068057582 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068057583 TestRomanNumerals.java FAIL +EditAction 1475068080575 RomanNumerals.java 164 1 1 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f2774f6..7a0eee2 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,10 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - return 1; + if (romanNum.equals("I")) { + return 1; + } else { + return 2; + } } } From f59529627df9a74a6241ebb1367cac383676eb20 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:08:14 +0300 Subject: [PATCH 005/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 3 ++- tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index cf5b711..077a25b 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -12,3 +12,8 @@ EditAction 1475068055372 TestRomanNumerals.java 372 2 4 2 UnitTestCaseAction 1475068057582 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068057583 TestRomanNumerals.java FAIL EditAction 1475068080575 RomanNumerals.java 164 1 1 0 +UnitTestCaseAction 1475068082713 TestRomanNumerals.java OK +UnitTestSessionAction 1475068082714 TestRomanNumerals.java OK +RefactoringAction 1475068088710 TestRomanNumerals.java ADD void test_II_2()/2 METHOD +RefactoringAction 1475068090731 TestRomanNumerals.java RENAME test_II_2()/2=>void test_III_3() METHOD +EditAction 1475068093948 TestRomanNumerals.java 488 3 6 3 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index b814c96..6e96963 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -1,2 +1,4 @@ 1475068041613 test-addition 2 74 true 1475068041614 test-addition 1 74 true +1475068082714 test-first 3 33 true +1475068082715 test-first 3 33 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 44e9270..eef35d2 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -1 +1,2 @@ 1475068041613 test-addition 2 74 false +1475068082714 test-first 3 33 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 44e9270..0f88bad 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -1 +1,2 @@ -1475068041613 test-addition 2 74 false +1475068041613 test-addition 2 74 true +1475068082714 test-first 3 41 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3aaefed..56582eb 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -17,5 +17,11 @@ public void test_II_2() { int number = rn.convertToInteger("II"); assertEquals(2, number); } + + @Test + public void test_III_3() { + int number = rn.convertToInteger("III"); + assertEquals(3, number); + } } From 167e795180da3069081f0422e36fa51480ae6fe8 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:08:29 +0300 Subject: [PATCH 006/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 077a25b..ba13997 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -17,3 +17,6 @@ UnitTestSessionAction 1475068082714 TestRomanNumerals.java OK RefactoringAction 1475068088710 TestRomanNumerals.java ADD void test_II_2()/2 METHOD RefactoringAction 1475068090731 TestRomanNumerals.java RENAME test_II_2()/2=>void test_III_3() METHOD EditAction 1475068093948 TestRomanNumerals.java 488 3 6 3 +UnitTestCaseAction 1475068096253 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068096254 TestRomanNumerals.java FAIL +EditAction 1475068109491 RomanNumerals.java 217 1 1 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 7a0eee2..a054934 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,8 +3,10 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { if (romanNum.equals("I")) { return 1; - } else { + } else if (romanNum.equals("II")) { return 2; + } else { + return 3; } } } From 3d71632ef5aeeb65bc51caf2e2bdd375b4da510c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:09:10 +0300 Subject: [PATCH 007/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index ba13997..79c1d10 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -20,3 +20,8 @@ EditAction 1475068093948 TestRomanNumerals.java 488 3 6 3 UnitTestCaseAction 1475068096253 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068096254 TestRomanNumerals.java FAIL EditAction 1475068109491 RomanNumerals.java 217 1 1 0 +UnitTestCaseAction 1475068112052 TestRomanNumerals.java OK +UnitTestSessionAction 1475068112053 TestRomanNumerals.java OK +RefactoringAction 1475068123282 TestRomanNumerals.java ADD void test_III_3()/2 METHOD +RefactoringAction 1475068146806 TestRomanNumerals.java RENAME test_III_3()/2=>void test_IV_4() METHOD +EditAction 1475068150436 TestRomanNumerals.java 602 4 8 4 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 6e96963..41ee009 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -2,3 +2,5 @@ 1475068041614 test-addition 1 74 true 1475068082714 test-first 3 33 true 1475068082715 test-first 3 33 true +1475068112053 test-first 3 23 true +1475068112054 test-first 3 23 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index eef35d2..98ca880 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -1,2 +1,3 @@ 1475068041613 test-addition 2 74 false 1475068082714 test-first 3 33 true +1475068112053 test-first 3 23 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 0f88bad..2d994d9 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -1,2 +1,3 @@ 1475068041613 test-addition 2 74 true 1475068082714 test-first 3 41 true +1475068112053 test-first 3 29 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 56582eb..382c33f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -23,5 +23,11 @@ public void test_III_3() { int number = rn.convertToInteger("III"); assertEquals(3, number); } + + @Test + public void test_IV_4() { + int number = rn.convertToInteger("IV"); + assertEquals(4, number); + } } From 7875a12a867b003412322ab6fabf6819d8641ca3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:10:38 +0300 Subject: [PATCH 008/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 79c1d10..1df1a1e 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -25,3 +25,6 @@ UnitTestSessionAction 1475068112053 TestRomanNumerals.java OK RefactoringAction 1475068123282 TestRomanNumerals.java ADD void test_III_3()/2 METHOD RefactoringAction 1475068146806 TestRomanNumerals.java RENAME test_III_3()/2=>void test_IV_4() METHOD EditAction 1475068150436 TestRomanNumerals.java 602 4 8 4 +UnitTestCaseAction 1475068153427 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068153428 TestRomanNumerals.java FAIL +EditAction 1475068237992 RomanNumerals.java 271 1 1 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a054934..38bc6d1 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,8 +5,10 @@ public int convertToInteger(String romanNum) { return 1; } else if (romanNum.equals("II")) { return 2; - } else { + } else if (romanNum.equals("III")) { return 3; + } else { + return 4; } } } From 8173abeeb0ba4f68f54dbd9121d0001913576ebc Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:15:31 +0300 Subject: [PATCH 009/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 8 ++++++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 8 ++++++++ 5 files changed, 20 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 1df1a1e..126f35a 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -28,3 +28,11 @@ EditAction 1475068150436 TestRomanNumerals.java 602 4 8 4 UnitTestCaseAction 1475068153427 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068153428 TestRomanNumerals.java FAIL EditAction 1475068237992 RomanNumerals.java 271 1 1 0 +UnitTestCaseAction 1475068240910 TestRomanNumerals.java OK +UnitTestSessionAction 1475068240911 TestRomanNumerals.java OK +RefactoringAction 1475068412969 TestRomanNumerals.java ADD void test_ FIELD +RefactoringAction 1475068414987 TestRomanNumerals.java RENAME test_=>void test_V_ FIELD +RefactoringAction 1475068419499 TestRomanNumerals.java RENAME test_V_=>void test_V_cannot_repeat() METHOD +RefactoringAction 1475068481375 RomanNumerals.java ADD import java.util.regex.Pattern IMPORT +RefactoringAction 1475068527395 RomanNumerals.java ADD import java.util.regex.Matcher IMPORT +EditAction 1475068531137 RomanNumerals.java 484 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 41ee009..6e5fd5f 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -4,3 +4,5 @@ 1475068082715 test-first 3 33 true 1475068112053 test-first 3 23 true 1475068112054 test-first 3 23 true +1475068240911 test-first 3 117 true +1475068240912 test-first 3 117 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 98ca880..a56ed82 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1475068041613 test-addition 2 74 false 1475068082714 test-first 3 33 true 1475068112053 test-first 3 23 true +1475068240911 test-first 3 117 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 2d994d9..fc1aeb3 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1475068041613 test-addition 2 74 true 1475068082714 test-first 3 41 true 1475068112053 test-first 3 29 true +1475068240911 test-first 3 128 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 38bc6d1..4c044cc 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,14 @@ +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class RomanNumerals { public int convertToInteger(String romanNum) { + Pattern p = Pattern.compile("V{2,}"); + Matcher m = p.matcher(romanNum); + if (m.find()) { + throw new IllegalArgumentException(); + } + if (romanNum.equals("I")) { return 1; } else if (romanNum.equals("II")) { From ce04c7df3d87ad54b658eb8372f9489da4f404a5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:15:39 +0300 Subject: [PATCH 010/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 126f35a..7dba154 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -36,3 +36,4 @@ RefactoringAction 1475068419499 TestRomanNumerals.java RENAME test_V_=>void test RefactoringAction 1475068481375 RomanNumerals.java ADD import java.util.regex.Pattern IMPORT RefactoringAction 1475068527395 RomanNumerals.java ADD import java.util.regex.Matcher IMPORT EditAction 1475068531137 RomanNumerals.java 484 1 4 0 +EditAction 1475068539209 TestRomanNumerals.java 742 5 9 4 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 382c33f..53e6a26 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -30,4 +30,9 @@ public void test_IV_4() { assertEquals(4, number); } + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_repeat() { + int number = rn.convertToInteger("VV"); + } + } From 436f4cb7c06c082f8c3dd43c4e4a3e3f394f7e04 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:16:30 +0300 Subject: [PATCH 011/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 ++++ .../20160928160607189/besouroEpisodes.txt | 24 +++++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 ++++ 5 files changed, 36 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 7dba154..d7b6b61 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -37,3 +37,8 @@ RefactoringAction 1475068481375 RomanNumerals.java ADD import java.util.regex.Pa RefactoringAction 1475068527395 RomanNumerals.java ADD import java.util.regex.Matcher IMPORT EditAction 1475068531137 RomanNumerals.java 484 1 4 0 EditAction 1475068539209 TestRomanNumerals.java 742 5 9 4 +UnitTestCaseAction 1475068542345 TestRomanNumerals.java OK +UnitTestSessionAction 1475068542346 TestRomanNumerals.java OK +RefactoringAction 1475068580316 TestRomanNumerals.java ADD void test_I_cannot_repeat_ FIELD +RefactoringAction 1475068586836 TestRomanNumerals.java RENAME test_I_cannot_repeat_=>void test_I_cannot_repeat_four_times() METHOD +EditAction 1475068590244 TestRomanNumerals.java 896 6 10 4 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 6e5fd5f..6928f4c 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -6,3 +6,27 @@ 1475068112054 test-first 3 23 true 1475068240911 test-first 3 117 true 1475068240912 test-first 3 117 true +1475068542346 refactoring 3 129 true +1475068542347 refactoring 3 129 true +1475068542348 refactoring 3 129 true +1475068542349 refactoring 3 129 true +1475068542350 refactoring 3 129 true +1475068542351 refactoring 3 129 true +1475068542352 refactoring 3 129 true +1475068542353 refactoring 3 129 true +1475068542354 refactoring 3 129 true +1475068542355 refactoring 3 129 true +1475068542356 refactoring 3 129 true +1475068542357 refactoring 3 129 true +1475068542358 refactoring 3 129 true +1475068542359 refactoring 3 129 true +1475068542360 refactoring 3 129 true +1475068542361 refactoring 3 129 true +1475068542362 refactoring 3 129 true +1475068542363 refactoring 3 129 true +1475068542364 refactoring 3 129 true +1475068542365 refactoring 3 129 true +1475068542366 refactoring 3 129 true +1475068542367 refactoring 3 129 true +1475068542368 refactoring 3 129 true +1475068542369 refactoring 3 129 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index a56ed82..9aff14e 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -2,3 +2,4 @@ 1475068082714 test-first 3 33 true 1475068112053 test-first 3 23 true 1475068240911 test-first 3 117 true +1475068542346 refactoring 3 129 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index fc1aeb3..647c097 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -2,3 +2,4 @@ 1475068082714 test-first 3 41 true 1475068112053 test-first 3 29 true 1475068240911 test-first 3 128 true +1475068542346 refactoring 3 301 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 53e6a26..5f1fcbb 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -34,5 +34,10 @@ public void test_IV_4() { public void test_V_cannot_repeat() { int number = rn.convertToInteger("VV"); } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_repeat_four_times() { + int number = rn.convertToInteger("IIII"); + } } From 41a62fd6a10597800a0221315e65815ac91b1d96 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:17:04 +0300 Subject: [PATCH 012/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index d7b6b61..0d046e1 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -42,3 +42,6 @@ UnitTestSessionAction 1475068542346 TestRomanNumerals.java OK RefactoringAction 1475068580316 TestRomanNumerals.java ADD void test_I_cannot_repeat_ FIELD RefactoringAction 1475068586836 TestRomanNumerals.java RENAME test_I_cannot_repeat_=>void test_I_cannot_repeat_four_times() METHOD EditAction 1475068590244 TestRomanNumerals.java 896 6 10 4 +UnitTestCaseAction 1475068592806 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068592807 TestRomanNumerals.java FAIL +EditAction 1475068624254 RomanNumerals.java 490 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4c044cc..991d958 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("V{2,}"); + Pattern p = Pattern.compile("I{4,}|V{2,}"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 6def34c974ac88eaa95ac444fa51b15324a26ecb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:19:45 +0300 Subject: [PATCH 013/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 6 ++++++ .besouro/20160928160607189/besouroEpisodes.txt | 9 +++++++++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 22 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 0d046e1..dc566ba 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -45,3 +45,9 @@ EditAction 1475068590244 TestRomanNumerals.java 896 6 10 4 UnitTestCaseAction 1475068592806 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068592807 TestRomanNumerals.java FAIL EditAction 1475068624254 RomanNumerals.java 490 1 4 0 +UnitTestCaseAction 1475068627249 TestRomanNumerals.java OK +UnitTestSessionAction 1475068627250 TestRomanNumerals.java OK +RefactoringAction 1475068770451 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from FIELD +RefactoringAction 1475068771469 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from=>void test_I_cannot_be_subtracted_from_ FIELD +RefactoringAction 1475068777486 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_=>void test_I_cannot_be_subtracted_from_L() METHOD +EditAction 1475068785120 TestRomanNumerals.java 1051 7 11 4 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 6928f4c..e2f40e6 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -30,3 +30,12 @@ 1475068542367 refactoring 3 129 true 1475068542368 refactoring 3 129 true 1475068542369 refactoring 3 129 true +1475068627250 refactoring 3 46 true +1475068627251 refactoring 3 46 true +1475068627252 refactoring 3 46 true +1475068627253 refactoring 3 46 true +1475068627254 refactoring 3 46 true +1475068627255 refactoring 3 46 true +1475068627256 refactoring 3 46 true +1475068627257 refactoring 3 46 true +1475068627258 refactoring 3 46 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 9aff14e..22ff2a4 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -3,3 +3,4 @@ 1475068112053 test-first 3 23 true 1475068240911 test-first 3 117 true 1475068542346 refactoring 3 129 false +1475068627250 refactoring 3 46 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 647c097..867274d 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -3,3 +3,4 @@ 1475068112053 test-first 3 29 true 1475068240911 test-first 3 128 true 1475068542346 refactoring 3 301 true +1475068627250 refactoring 3 84 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5f1fcbb..5cf9e71 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -39,5 +39,10 @@ public void test_V_cannot_repeat() { public void test_I_cannot_repeat_four_times() { int number = rn.convertToInteger("IIII"); } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_L() { + int number = rn.convertToInteger("IL"); + } } From ed66d44f6965cdd78df2254ac7fed9881d1e3370 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:20:13 +0300 Subject: [PATCH 014/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index dc566ba..5791b72 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -51,3 +51,6 @@ RefactoringAction 1475068770451 TestRomanNumerals.java ADD void test_I_cannot_be RefactoringAction 1475068771469 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from=>void test_I_cannot_be_subtracted_from_ FIELD RefactoringAction 1475068777486 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_=>void test_I_cannot_be_subtracted_from_L() METHOD EditAction 1475068785120 TestRomanNumerals.java 1051 7 11 4 +UnitTestCaseAction 1475068809545 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068809546 TestRomanNumerals.java FAIL +EditAction 1475068812974 RomanNumerals.java 493 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 991d958..1291450 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}"); + Pattern p = Pattern.compile("I{4,}|V{2,}|IL"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 15c1cd47402c82202089dbec8c32d57d897d5505 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:21:56 +0300 Subject: [PATCH 015/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 16 ++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 4 +++- tests/TestRomanNumerals.java | 6 ++++++ 6 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 5791b72..230e2c0 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -54,3 +54,8 @@ EditAction 1475068785120 TestRomanNumerals.java 1051 7 11 4 UnitTestCaseAction 1475068809545 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068809546 TestRomanNumerals.java FAIL EditAction 1475068812974 RomanNumerals.java 493 1 4 0 +UnitTestCaseAction 1475068815072 TestRomanNumerals.java OK +UnitTestSessionAction 1475068815073 TestRomanNumerals.java OK +UnitTestCaseAction 1475068878168 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068878169 TestRomanNumerals.java FAIL +EditAction 1475068916349 RomanNumerals.java 546 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index e2f40e6..a3bd321 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -39,3 +39,19 @@ 1475068627256 refactoring 3 46 true 1475068627257 refactoring 3 46 true 1475068627258 refactoring 3 46 true +1475068815073 refactoring 3 44 true +1475068815074 refactoring 3 44 true +1475068815075 refactoring 3 44 true +1475068815076 refactoring 3 44 true +1475068815077 refactoring 3 44 true +1475068815078 refactoring 3 44 true +1475068815079 refactoring 3 44 true +1475068815080 refactoring 3 44 true +1475068815081 refactoring 3 44 true +1475068815082 refactoring 3 44 true +1475068815083 refactoring 3 44 true +1475068815084 refactoring 3 44 true +1475068815085 refactoring 3 44 true +1475068815086 refactoring 3 44 true +1475068815087 refactoring 3 44 true +1475068815088 refactoring 3 44 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 22ff2a4..62c4202 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -4,3 +4,4 @@ 1475068240911 test-first 3 117 true 1475068542346 refactoring 3 129 false 1475068627250 refactoring 3 46 true +1475068815073 refactoring 3 44 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 867274d..af698b3 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -4,3 +4,4 @@ 1475068240911 test-first 3 128 true 1475068542346 refactoring 3 301 true 1475068627250 refactoring 3 84 true +1475068815073 refactoring 3 187 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1291450..ca7bf47 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -15,8 +15,10 @@ public int convertToInteger(String romanNum) { return 2; } else if (romanNum.equals("III")) { return 3; - } else { + } else if (romanNum.equals("IV")) { return 4; + } else { + return 6; } } } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5cf9e71..560b241 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -29,6 +29,12 @@ public void test_IV_4() { int number = rn.convertToInteger("IV"); assertEquals(4, number); } + + @Test + public void test_VI_6() { + int number = rn.convertToInteger("VI"); + assertEquals(6, number); + } @Test (expected = IllegalArgumentException.class) public void test_V_cannot_repeat() { From af8fb3595a7cebe7d5f9268abbefd5c9a6e05a92 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:23:16 +0300 Subject: [PATCH 016/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 6 ++++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .../20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- tests/TestRomanNumerals.java | 11 ++++++++--- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 230e2c0..bca2a16 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -59,3 +59,9 @@ UnitTestSessionAction 1475068815073 TestRomanNumerals.java OK UnitTestCaseAction 1475068878168 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068878169 TestRomanNumerals.java FAIL EditAction 1475068916349 RomanNumerals.java 546 1 4 0 +UnitTestCaseAction 1475068918396 TestRomanNumerals.java OK +UnitTestSessionAction 1475068918398 TestRomanNumerals.java OK +RefactoringAction 1475068966136 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_twice() METHOD +UnitTestCaseAction 1475068982559 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068982560 TestRomanNumerals.java FAIL +EditAction 1475068996349 RomanNumerals.java 553 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index a3bd321..dbe4b3a 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -55,3 +55,4 @@ 1475068815086 refactoring 3 44 true 1475068815087 refactoring 3 44 true 1475068815088 refactoring 3 44 true +1475068918398 refactoring 2A 40 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 62c4202..ed5e2ab 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -5,3 +5,4 @@ 1475068542346 refactoring 3 129 false 1475068627250 refactoring 3 46 true 1475068815073 refactoring 3 44 false +1475068918398 refactoring 2A 40 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index af698b3..091ab15 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -5,3 +5,4 @@ 1475068542346 refactoring 3 301 true 1475068627250 refactoring 3 84 true 1475068815073 refactoring 3 187 true +1475068918398 refactoring 2A 103 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ca7bf47..657f9de 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}|IL"); + Pattern p = Pattern.compile("I{4,}|V{2,}|IL|I{2,}V"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 560b241..c390fb4 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -38,17 +38,22 @@ public void test_VI_6() { @Test (expected = IllegalArgumentException.class) public void test_V_cannot_repeat() { - int number = rn.convertToInteger("VV"); + rn.convertToInteger("VV"); } @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { - int number = rn.convertToInteger("IIII"); + rn.convertToInteger("IIII"); } @Test (expected = IllegalArgumentException.class) public void test_I_cannot_be_subtracted_from_L() { - int number = rn.convertToInteger("IL"); + rn.convertToInteger("IL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice() { + rn.convertToInteger("IIV"); } } From a683caa96b9360dd88ea57670fe588cb87932916 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:24:06 +0300 Subject: [PATCH 017/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 7 +++++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index bca2a16..a31d455 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -65,3 +65,10 @@ RefactoringAction 1475068966136 TestRomanNumerals.java ADD void test_I_cannot_be UnitTestCaseAction 1475068982559 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068982560 TestRomanNumerals.java FAIL EditAction 1475068996349 RomanNumerals.java 553 1 4 0 +UnitTestCaseAction 1475068998505 TestRomanNumerals.java OK +UnitTestSessionAction 1475068998505 TestRomanNumerals.java OK +RefactoringAction 1475069029255 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_twice()/2 METHOD +RefactoringAction 1475069031772 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice()/2=>void test_V_cannot_be_subtracted_twice() METHOD +RefactoringAction 1475069035287 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_twice()=>void test_V_cannot_be_subtracted_from_() METHOD +RefactoringAction 1475069042804 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_()=>void test_V_cannot_be_subtracted_from_X() METHOD +EditAction 1475069045779 TestRomanNumerals.java 1410 10 15 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index dbe4b3a..e8e7e02 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -56,3 +56,4 @@ 1475068815087 refactoring 3 44 true 1475068815088 refactoring 3 44 true 1475068918398 refactoring 2A 40 true +1475068998505 test-first 3 32 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index ed5e2ab..631fa7c 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -6,3 +6,4 @@ 1475068627250 refactoring 3 46 true 1475068815073 refactoring 3 44 false 1475068918398 refactoring 2A 40 false +1475068998505 test-first 3 32 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 091ab15..c0d7bd5 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -6,3 +6,4 @@ 1475068627250 refactoring 3 84 true 1475068815073 refactoring 3 187 true 1475068918398 refactoring 2A 103 true +1475068998505 test-first 3 80 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c390fb4..ff07b5f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -55,5 +55,10 @@ public void test_I_cannot_be_subtracted_from_L() { public void test_I_cannot_be_subtracted_twice() { rn.convertToInteger("IIV"); } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_X() { + rn.convertToInteger("VX"); + } } From 0d1f6604fd302603037fea910f4212d23d04ba8d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:24:17 +0300 Subject: [PATCH 018/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index a31d455..1049d4a 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -72,3 +72,6 @@ RefactoringAction 1475069031772 TestRomanNumerals.java RENAME test_I_cannot_be_s RefactoringAction 1475069035287 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_twice()=>void test_V_cannot_be_subtracted_from_() METHOD RefactoringAction 1475069042804 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_()=>void test_V_cannot_be_subtracted_from_X() METHOD EditAction 1475069045779 TestRomanNumerals.java 1410 10 15 5 +UnitTestCaseAction 1475069047956 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069047957 TestRomanNumerals.java FAIL +EditAction 1475069056609 RomanNumerals.java 556 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 657f9de..ad1fefc 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}|IL|I{2,}V"); + Pattern p = Pattern.compile("I{4,}|V{2,}|IL|I{2,}V|VX"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 79a7d692df310a98aa63ad7d171dcf59ae81ca17 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:24:45 +0300 Subject: [PATCH 019/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 1049d4a..dee5c46 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -75,3 +75,8 @@ EditAction 1475069045779 TestRomanNumerals.java 1410 10 15 5 UnitTestCaseAction 1475069047956 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069047957 TestRomanNumerals.java FAIL EditAction 1475069056609 RomanNumerals.java 556 1 4 0 +UnitTestCaseAction 1475069058567 TestRomanNumerals.java OK +UnitTestSessionAction 1475069058568 TestRomanNumerals.java OK +RefactoringAction 1475069080837 TestRomanNumerals.java ADD void test_V_cannot_repeat()/2 METHOD +RefactoringAction 1475069083354 TestRomanNumerals.java RENAME test_V_cannot_repeat()/2=>void test_L_cannot_repeat() METHOD +EditAction 1475069085328 TestRomanNumerals.java 1537 11 16 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index e8e7e02..aaa20ae 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -57,3 +57,5 @@ 1475068815088 refactoring 3 44 true 1475068918398 refactoring 2A 40 true 1475068998505 test-first 3 32 true +1475069058568 test-first 3 29 true +1475069058569 test-first 3 29 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 631fa7c..36372c1 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -7,3 +7,4 @@ 1475068815073 refactoring 3 44 false 1475068918398 refactoring 2A 40 false 1475068998505 test-first 3 32 true +1475069058568 test-first 3 29 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index c0d7bd5..5edb25a 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -7,3 +7,4 @@ 1475068815073 refactoring 3 187 true 1475068918398 refactoring 2A 103 true 1475068998505 test-first 3 80 true +1475069058568 test-first 3 60 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index ff07b5f..3dd803f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -40,6 +40,11 @@ public void test_VI_6() { public void test_V_cannot_repeat() { rn.convertToInteger("VV"); } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_repeat() { + rn.convertToInteger("LL"); + } @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { From 6796618703066fbff53975fab234587114743d9e Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:25:01 +0300 Subject: [PATCH 020/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index dee5c46..4f5d199 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -80,3 +80,6 @@ UnitTestSessionAction 1475069058568 TestRomanNumerals.java OK RefactoringAction 1475069080837 TestRomanNumerals.java ADD void test_V_cannot_repeat()/2 METHOD RefactoringAction 1475069083354 TestRomanNumerals.java RENAME test_V_cannot_repeat()/2=>void test_L_cannot_repeat() METHOD EditAction 1475069085328 TestRomanNumerals.java 1537 11 16 5 +UnitTestCaseAction 1475069086976 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069086977 TestRomanNumerals.java FAIL +EditAction 1475069101330 RomanNumerals.java 562 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ad1fefc..5ab526c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}|IL|I{2,}V|VX"); + Pattern p = Pattern.compile("I{4,}|V{2,}|L{2,}|IL|I{2,}V|VX"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From d00e6317371307bdeab32c8791fe8a4e07455e86 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:25:18 +0300 Subject: [PATCH 021/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 4f5d199..cab939a 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -83,3 +83,8 @@ EditAction 1475069085328 TestRomanNumerals.java 1537 11 16 5 UnitTestCaseAction 1475069086976 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069086977 TestRomanNumerals.java FAIL EditAction 1475069101330 RomanNumerals.java 562 1 4 0 +UnitTestCaseAction 1475069104503 TestRomanNumerals.java OK +UnitTestSessionAction 1475069104504 TestRomanNumerals.java OK +RefactoringAction 1475069113890 TestRomanNumerals.java ADD void test_L_cannot_repeat()/2 METHOD +RefactoringAction 1475069116407 TestRomanNumerals.java RENAME test_L_cannot_repeat()/2=>void test_D_cannot_repeat() METHOD +EditAction 1475069118369 TestRomanNumerals.java 1664 12 17 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index aaa20ae..30b0cdf 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -59,3 +59,4 @@ 1475068998505 test-first 3 32 true 1475069058568 test-first 3 29 true 1475069058569 test-first 3 29 true +1475069104504 test-first 3 23 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 36372c1..02434ba 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -8,3 +8,4 @@ 1475068918398 refactoring 2A 40 false 1475068998505 test-first 3 32 true 1475069058568 test-first 3 29 true +1475069104504 test-first 3 23 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 5edb25a..b2a3a76 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -8,3 +8,4 @@ 1475068918398 refactoring 2A 103 true 1475068998505 test-first 3 80 true 1475069058568 test-first 3 60 true +1475069104504 test-first 3 45 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3dd803f..6883cd8 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -45,6 +45,11 @@ public void test_V_cannot_repeat() { public void test_L_cannot_repeat() { rn.convertToInteger("LL"); } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_repeat() { + rn.convertToInteger("DD"); + } @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { From 1ae5e25571ca565fcb13c3419e3ef51aed9a84b2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:25:26 +0300 Subject: [PATCH 022/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index cab939a..bcecea0 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -88,3 +88,6 @@ UnitTestSessionAction 1475069104504 TestRomanNumerals.java OK RefactoringAction 1475069113890 TestRomanNumerals.java ADD void test_L_cannot_repeat()/2 METHOD RefactoringAction 1475069116407 TestRomanNumerals.java RENAME test_L_cannot_repeat()/2=>void test_D_cannot_repeat() METHOD EditAction 1475069118369 TestRomanNumerals.java 1664 12 17 5 +UnitTestCaseAction 1475069120319 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069120320 TestRomanNumerals.java FAIL +EditAction 1475069125743 RomanNumerals.java 568 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 5ab526c..d19378f 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}|L{2,}|IL|I{2,}V|VX"); + Pattern p = Pattern.compile("I{4,}|V{2,}|L{2,}|D{2,}|IL|I{2,}V|VX"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 19b2267523d5b9d9dea9217c6dc721fb75e1e608 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:25:38 +0300 Subject: [PATCH 023/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index bcecea0..2f23e10 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -91,3 +91,6 @@ EditAction 1475069118369 TestRomanNumerals.java 1664 12 17 5 UnitTestCaseAction 1475069120319 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069120320 TestRomanNumerals.java FAIL EditAction 1475069125743 RomanNumerals.java 568 1 4 0 +UnitTestCaseAction 1475069127677 TestRomanNumerals.java OK +UnitTestSessionAction 1475069127678 TestRomanNumerals.java OK +EditAction 1475069138277 RomanNumerals.java 565 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 30b0cdf..d42c4ae 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -60,3 +60,4 @@ 1475069058568 test-first 3 29 true 1475069058569 test-first 3 29 true 1475069104504 test-first 3 23 true +1475069127678 test-first 3 13 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 02434ba..d83764d 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -9,3 +9,4 @@ 1475068998505 test-first 3 32 true 1475069058568 test-first 3 29 true 1475069104504 test-first 3 23 true +1475069127678 test-first 3 13 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index b2a3a76..66c5144 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -9,3 +9,4 @@ 1475068998505 test-first 3 80 true 1475069058568 test-first 3 60 true 1475069104504 test-first 3 45 true +1475069127678 test-first 3 23 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d19378f..2bcb118 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2,}|L{2,}|D{2,}|IL|I{2,}V|VX"); + Pattern p = Pattern.compile("I{4,}|V{2}|L{2}|D{2}|IL|I{2,}V|VX"); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 5fcfbaa1959d1bd62a722dfda7fbf217b1311cea Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:26:21 +0300 Subject: [PATCH 024/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 6 +++++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 2f23e10..2980849 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -94,3 +94,6 @@ EditAction 1475069125743 RomanNumerals.java 568 1 4 0 UnitTestCaseAction 1475069127677 TestRomanNumerals.java OK UnitTestSessionAction 1475069127678 TestRomanNumerals.java OK EditAction 1475069138277 RomanNumerals.java 565 1 4 0 +UnitTestCaseAction 1475069140559 TestRomanNumerals.java OK +UnitTestSessionAction 1475069140560 TestRomanNumerals.java OK +EditAction 1475069180891 RomanNumerals.java 599 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index d42c4ae..77dd872 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -61,3 +61,4 @@ 1475069058569 test-first 3 29 true 1475069104504 test-first 3 23 true 1475069127678 test-first 3 13 true +1475069140560 refactoring 2A 2 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index d83764d..c25ee80 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -10,3 +10,4 @@ 1475069058568 test-first 3 29 true 1475069104504 test-first 3 23 true 1475069127678 test-first 3 13 true +1475069140560 refactoring 2A 2 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 66c5144..f5d901a 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -10,3 +10,4 @@ 1475069058568 test-first 3 60 true 1475069104504 test-first 3 45 true 1475069127678 test-first 3 23 true +1475069140560 refactoring 2A 12 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 2bcb118..3a1c6e4 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,7 +3,11 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("I{4,}|V{2}|L{2}|D{2}|IL|I{2,}V|VX"); + Pattern p = Pattern.compile("" + + "I{4}" + + "|V{2}|L{2}|D{2}" + + "|IL|I{2}V|VX" + ); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From 9e60f4b30c6affae2a8ace440209399858424eda Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:26:35 +0300 Subject: [PATCH 025/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 4 ++-- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 2980849..e8b33e4 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -97,3 +97,6 @@ EditAction 1475069138277 RomanNumerals.java 565 1 4 0 UnitTestCaseAction 1475069140559 TestRomanNumerals.java OK UnitTestSessionAction 1475069140560 TestRomanNumerals.java OK EditAction 1475069180891 RomanNumerals.java 599 1 4 0 +UnitTestCaseAction 1475069182685 TestRomanNumerals.java OK +UnitTestSessionAction 1475069182686 TestRomanNumerals.java OK +EditAction 1475069194864 RomanNumerals.java 635 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 77dd872..6ed559d 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -62,3 +62,4 @@ 1475069104504 test-first 3 23 true 1475069127678 test-first 3 13 true 1475069140560 refactoring 2A 2 true +1475069182686 refactoring 2A 1 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index c25ee80..2fed125 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -11,3 +11,4 @@ 1475069104504 test-first 3 23 true 1475069127678 test-first 3 13 true 1475069140560 refactoring 2A 2 false +1475069182686 refactoring 2A 1 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index f5d901a..2265060 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -11,3 +11,4 @@ 1475069104504 test-first 3 45 true 1475069127678 test-first 3 23 true 1475069140560 refactoring 2A 12 true +1475069182686 refactoring 2A 42 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 3a1c6e4..ce62620 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,8 +4,8 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}" - + "|V{2}|L{2}|D{2}" + + "I{4}" // repeat limit + + "|V{2}|L{2}|D{2}" // can't repeat + "|IL|I{2}V|VX" ); Matcher m = p.matcher(romanNum); From 3f45c472ead043b9b5e8fa222aa91c2c23068c82 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:00 +0300 Subject: [PATCH 026/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 7 +++++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .../20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 15 ++++++++++----- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index e8b33e4..e99414f 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -100,3 +100,10 @@ EditAction 1475069180891 RomanNumerals.java 599 1 4 0 UnitTestCaseAction 1475069182685 TestRomanNumerals.java OK UnitTestSessionAction 1475069182686 TestRomanNumerals.java OK EditAction 1475069194864 RomanNumerals.java 635 1 4 0 +UnitTestCaseAction 1475069196584 TestRomanNumerals.java OK +UnitTestSessionAction 1475069196585 TestRomanNumerals.java OK +RefactoringAction 1475069206435 TestRomanNumerals.java ADD void test_I_cannot_repeat_four_times()/2 METHOD +RefactoringAction 1475069209961 TestRomanNumerals.java REMOVE test_I_cannot_repeat_four_times()/2 METHOD +RefactoringAction 1475069212478 TestRomanNumerals.java ADD void test_I_cannot_repeat_four_times()/2 METHOD +RefactoringAction 1475069216496 TestRomanNumerals.java RENAME test_I_cannot_repeat_four_times()/2=>void test_X_cannot_repeat_four_times() METHOD +EditAction 1475069219632 TestRomanNumerals.java 1805 13 18 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 6ed559d..71f090e 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -63,3 +63,4 @@ 1475069127678 test-first 3 13 true 1475069140560 refactoring 2A 2 true 1475069182686 refactoring 2A 1 true +1475069196585 refactoring 2A 1 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 2fed125..4d5349a 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -12,3 +12,4 @@ 1475069127678 test-first 3 13 true 1475069140560 refactoring 2A 2 false 1475069182686 refactoring 2A 1 false +1475069196585 refactoring 2A 1 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 2265060..2a73675 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -12,3 +12,4 @@ 1475069127678 test-first 3 23 true 1475069140560 refactoring 2A 12 true 1475069182686 refactoring 2A 42 true +1475069196585 refactoring 2A 13 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 6883cd8..a612245 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -35,6 +35,16 @@ public void test_VI_6() { int number = rn.convertToInteger("VI"); assertEquals(6, number); } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_repeat_four_times() { + rn.convertToInteger("IIII"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_repeat_four_times() { + rn.convertToInteger("XXXX"); + } @Test (expected = IllegalArgumentException.class) public void test_V_cannot_repeat() { @@ -51,11 +61,6 @@ public void test_D_cannot_repeat() { rn.convertToInteger("DD"); } - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_repeat_four_times() { - rn.convertToInteger("IIII"); - } - @Test (expected = IllegalArgumentException.class) public void test_I_cannot_be_subtracted_from_L() { rn.convertToInteger("IL"); From 4d8c7e263a271499789e9521adc72b02a7b634c2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:10 +0300 Subject: [PATCH 027/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index e99414f..9df893b 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -107,3 +107,6 @@ RefactoringAction 1475069209961 TestRomanNumerals.java REMOVE test_I_cannot_repe RefactoringAction 1475069212478 TestRomanNumerals.java ADD void test_I_cannot_repeat_four_times()/2 METHOD RefactoringAction 1475069216496 TestRomanNumerals.java RENAME test_I_cannot_repeat_four_times()/2=>void test_X_cannot_repeat_four_times() METHOD EditAction 1475069219632 TestRomanNumerals.java 1805 13 18 5 +UnitTestCaseAction 1475069221835 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069221836 TestRomanNumerals.java FAIL +EditAction 1475069229818 RomanNumerals.java 639 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ce62620..207706a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,7 +4,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}" // repeat limit + + "I{4}|X{4}" // repeat limit + "|V{2}|L{2}|D{2}" // can't repeat + "|IL|I{2}V|VX" ); From 1ff326e903182462c4c12ad6dd2a3fb098de4fdb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:21 +0300 Subject: [PATCH 028/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 2 ++ .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 9df893b..f9c3d94 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -110,3 +110,8 @@ EditAction 1475069219632 TestRomanNumerals.java 1805 13 18 5 UnitTestCaseAction 1475069221835 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069221836 TestRomanNumerals.java FAIL EditAction 1475069229818 RomanNumerals.java 639 1 4 0 +UnitTestCaseAction 1475069231630 TestRomanNumerals.java OK +UnitTestSessionAction 1475069231631 TestRomanNumerals.java OK +RefactoringAction 1475069237516 TestRomanNumerals.java ADD void test_X_cannot_repeat_four_times()/2 METHOD +RefactoringAction 1475069240525 TestRomanNumerals.java RENAME test_X_cannot_repeat_four_times()/2=>void test_C_cannot_repeat_four_times() METHOD +EditAction 1475069241151 TestRomanNumerals.java 1946 14 19 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 71f090e..93855f0 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -64,3 +64,5 @@ 1475069140560 refactoring 2A 2 true 1475069182686 refactoring 2A 1 true 1475069196585 refactoring 2A 1 true +1475069231631 test-first 3 25 true +1475069231632 test-first 3 25 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 4d5349a..a961438 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -13,3 +13,4 @@ 1475069140560 refactoring 2A 2 false 1475069182686 refactoring 2A 1 false 1475069196585 refactoring 2A 1 false +1475069231631 test-first 3 25 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 2a73675..abae037 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -13,3 +13,4 @@ 1475069140560 refactoring 2A 12 true 1475069182686 refactoring 2A 42 true 1475069196585 refactoring 2A 13 true +1475069231631 test-first 3 35 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a612245..350e50f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -45,6 +45,11 @@ public void test_I_cannot_repeat_four_times() { public void test_X_cannot_repeat_four_times() { rn.convertToInteger("XXXX"); } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_repeat_four_times() { + rn.convertToInteger("CCCC"); + } @Test (expected = IllegalArgumentException.class) public void test_V_cannot_repeat() { From 0f7fc1610b69ade58366aa91b9a1ce23fb1d8871 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:30 +0300 Subject: [PATCH 029/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index f9c3d94..32d8363 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -115,3 +115,6 @@ UnitTestSessionAction 1475069231631 TestRomanNumerals.java OK RefactoringAction 1475069237516 TestRomanNumerals.java ADD void test_X_cannot_repeat_four_times()/2 METHOD RefactoringAction 1475069240525 TestRomanNumerals.java RENAME test_X_cannot_repeat_four_times()/2=>void test_C_cannot_repeat_four_times() METHOD EditAction 1475069241151 TestRomanNumerals.java 1946 14 19 5 +UnitTestCaseAction 1475069243162 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069243163 TestRomanNumerals.java FAIL +EditAction 1475069249630 RomanNumerals.java 643 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 207706a..36d37a4 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,7 +4,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}|X{4}" // repeat limit + + "I{4}|X{4}|C{4}" // repeat limit + "|V{2}|L{2}|D{2}" // can't repeat + "|IL|I{2}V|VX" ); From 6d5de5ceb747b5aa0be1f2f2755bf9dd27d87322 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:43 +0300 Subject: [PATCH 030/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 32d8363..3bb07a7 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -118,3 +118,8 @@ EditAction 1475069241151 TestRomanNumerals.java 1946 14 19 5 UnitTestCaseAction 1475069243162 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069243163 TestRomanNumerals.java FAIL EditAction 1475069249630 RomanNumerals.java 643 1 4 0 +UnitTestCaseAction 1475069251537 TestRomanNumerals.java OK +UnitTestSessionAction 1475069251538 TestRomanNumerals.java OK +RefactoringAction 1475069258539 TestRomanNumerals.java ADD void test_C_cannot_repeat_four_times()/2 METHOD +RefactoringAction 1475069260552 TestRomanNumerals.java RENAME test_C_cannot_repeat_four_times()/2=>void test_M_cannot_repeat_four_times() METHOD +EditAction 1475069262553 TestRomanNumerals.java 2087 15 20 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 93855f0..233afb8 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -66,3 +66,4 @@ 1475069196585 refactoring 2A 1 true 1475069231631 test-first 3 25 true 1475069231632 test-first 3 25 true +1475069251538 test-first 3 14 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index a961438..50f5071 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -14,3 +14,4 @@ 1475069182686 refactoring 2A 1 false 1475069196585 refactoring 2A 1 false 1475069231631 test-first 3 25 true +1475069251538 test-first 3 14 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index abae037..59e91a2 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -14,3 +14,4 @@ 1475069182686 refactoring 2A 42 true 1475069196585 refactoring 2A 13 true 1475069231631 test-first 3 35 true +1475069251538 test-first 3 19 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 350e50f..f7cc002 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -50,6 +50,11 @@ public void test_X_cannot_repeat_four_times() { public void test_C_cannot_repeat_four_times() { rn.convertToInteger("CCCC"); } + + @Test (expected = IllegalArgumentException.class) + public void test_M_cannot_repeat_four_times() { + rn.convertToInteger("MMMM"); + } @Test (expected = IllegalArgumentException.class) public void test_V_cannot_repeat() { From ccd3f44e2e97ddbf1e234b211a804914e8991dd9 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:27:52 +0300 Subject: [PATCH 031/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 3bb07a7..de59b4f 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -123,3 +123,6 @@ UnitTestSessionAction 1475069251538 TestRomanNumerals.java OK RefactoringAction 1475069258539 TestRomanNumerals.java ADD void test_C_cannot_repeat_four_times()/2 METHOD RefactoringAction 1475069260552 TestRomanNumerals.java RENAME test_C_cannot_repeat_four_times()/2=>void test_M_cannot_repeat_four_times() METHOD EditAction 1475069262553 TestRomanNumerals.java 2087 15 20 5 +UnitTestCaseAction 1475069264536 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069264537 TestRomanNumerals.java FAIL +EditAction 1475069272572 RomanNumerals.java 647 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 36d37a4..f9042c4 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,7 +4,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}|X{4}|C{4}" // repeat limit + + "I{4}|X{4}|C{4}|M{4}" // repeat limit + "|V{2}|L{2}|D{2}" // can't repeat + "|IL|I{2}V|VX" ); From 5df4de6c07045dbd29f00d1526272a67bed8553c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:30:46 +0300 Subject: [PATCH 032/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 4 ++-- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index de59b4f..0d41628 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -126,3 +126,6 @@ EditAction 1475069262553 TestRomanNumerals.java 2087 15 20 5 UnitTestCaseAction 1475069264536 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069264537 TestRomanNumerals.java FAIL EditAction 1475069272572 RomanNumerals.java 647 1 4 0 +UnitTestCaseAction 1475069274662 TestRomanNumerals.java OK +UnitTestSessionAction 1475069274663 TestRomanNumerals.java OK +EditAction 1475069446211 RomanNumerals.java 652 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 233afb8..f4fe82f 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -67,3 +67,4 @@ 1475069231631 test-first 3 25 true 1475069231632 test-first 3 25 true 1475069251538 test-first 3 14 true +1475069274663 test-first 3 16 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 50f5071..93c501e 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -15,3 +15,4 @@ 1475069196585 refactoring 2A 1 false 1475069231631 test-first 3 25 true 1475069251538 test-first 3 14 true +1475069274663 test-first 3 16 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 59e91a2..d619478 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -15,3 +15,4 @@ 1475069196585 refactoring 2A 13 true 1475069231631 test-first 3 35 true 1475069251538 test-first 3 19 true +1475069274663 test-first 3 23 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f9042c4..f066e3c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,8 +4,8 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}|X{4}|C{4}|M{4}" // repeat limit - + "|V{2}|L{2}|D{2}" // can't repeat + + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + + "V{2}|L{2}|D{2}|" // can't repeat + "|IL|I{2}V|VX" ); Matcher m = p.matcher(romanNum); From 9c92cc4e1a851b8ed80bd0621cb7993a8f63ac00 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:30:50 +0300 Subject: [PATCH 033/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 0d41628..c7ec461 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -129,3 +129,4 @@ EditAction 1475069272572 RomanNumerals.java 647 1 4 0 UnitTestCaseAction 1475069274662 TestRomanNumerals.java OK UnitTestSessionAction 1475069274663 TestRomanNumerals.java OK EditAction 1475069446211 RomanNumerals.java 652 1 4 0 +EditAction 1475069450477 RomanNumerals.java 651 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f066e3c..dcdd9d9 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "V{2}|L{2}|D{2}|" // can't repeat - + "|IL|I{2}V|VX" + + "IL|I{2}V|VX" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 5823ca887cd38a9eb52ee6ee1428d6a8854572e4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:32:06 +0300 Subject: [PATCH 034/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 4 +++- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index c7ec461..9c59c46 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -130,3 +130,6 @@ UnitTestCaseAction 1475069274662 TestRomanNumerals.java OK UnitTestSessionAction 1475069274663 TestRomanNumerals.java OK EditAction 1475069446211 RomanNumerals.java 652 1 4 0 EditAction 1475069450477 RomanNumerals.java 651 1 4 0 +UnitTestCaseAction 1475069452265 TestRomanNumerals.java OK +UnitTestSessionAction 1475069452266 TestRomanNumerals.java OK +EditAction 1475069526284 RomanNumerals.java 826 1 4 0 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index f4fe82f..0dfe5cf 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -68,3 +68,4 @@ 1475069231632 test-first 3 25 true 1475069251538 test-first 3 14 true 1475069274663 test-first 3 16 true +1475069452266 refactoring 2A 6 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 93c501e..c20f0c2 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -16,3 +16,4 @@ 1475069231631 test-first 3 25 true 1475069251538 test-first 3 14 true 1475069274663 test-first 3 16 true +1475069452266 refactoring 2A 6 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index d619478..f58ed75 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -16,3 +16,4 @@ 1475069231631 test-first 3 35 true 1475069251538 test-first 3 19 true 1475069274663 test-first 3 23 true +1475069452266 refactoring 2A 177 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index dcdd9d9..7337bbe 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,9 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|I{2}V|VX" + + "IL|" // can't subtract from too big numbers + + "I{2}V|" // can't subtract more than once + + "VX" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 093993361e3bad2aa8f6dad6e08b57f648b9973a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:32:45 +0300 Subject: [PATCH 035/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 9c59c46..3edddbb 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -133,3 +133,8 @@ EditAction 1475069450477 RomanNumerals.java 651 1 4 0 UnitTestCaseAction 1475069452265 TestRomanNumerals.java OK UnitTestSessionAction 1475069452266 TestRomanNumerals.java OK EditAction 1475069526284 RomanNumerals.java 826 1 4 0 +UnitTestCaseAction 1475069529331 TestRomanNumerals.java OK +UnitTestSessionAction 1475069529331 TestRomanNumerals.java OK +RefactoringAction 1475069557590 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_L()/2 METHOD +RefactoringAction 1475069563105 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_L()/2=>void test_I_cannot_be_subtracted_from_C() METHOD +EditAction 1475069565389 TestRomanNumerals.java 2229 16 21 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 0dfe5cf..3c31cf9 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -69,3 +69,4 @@ 1475069251538 test-first 3 14 true 1475069274663 test-first 3 16 true 1475069452266 refactoring 2A 6 true +1475069529331 refactoring 2A 3 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index c20f0c2..3727c0f 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -17,3 +17,4 @@ 1475069251538 test-first 3 14 true 1475069274663 test-first 3 16 true 1475069452266 refactoring 2A 6 true +1475069529331 refactoring 2A 3 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index f58ed75..d2d3e3e 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -17,3 +17,4 @@ 1475069251538 test-first 3 19 true 1475069274663 test-first 3 23 true 1475069452266 refactoring 2A 177 true +1475069529331 refactoring 2A 77 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f7cc002..f84791a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -76,6 +76,11 @@ public void test_I_cannot_be_subtracted_from_L() { rn.convertToInteger("IL"); } + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_C() { + rn.convertToInteger("IC"); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_be_subtracted_twice() { rn.convertToInteger("IIV"); From 2a0c30929f8cf8a7602d25d729fc17632c71bcdf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:32:52 +0300 Subject: [PATCH 036/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 3edddbb..3f10fc6 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -138,3 +138,6 @@ UnitTestSessionAction 1475069529331 TestRomanNumerals.java OK RefactoringAction 1475069557590 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_L()/2 METHOD RefactoringAction 1475069563105 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_L()/2=>void test_I_cannot_be_subtracted_from_C() METHOD EditAction 1475069565389 TestRomanNumerals.java 2229 16 21 5 +UnitTestCaseAction 1475069567627 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069567628 TestRomanNumerals.java FAIL +EditAction 1475069572046 RomanNumerals.java 829 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 7337bbe..a9a56ff 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|" // can't subtract from too big numbers + + "IL|IC|" // can't subtract from too big numbers + "I{2}V|" // can't subtract more than once + "VX" // can't subtract the '5' symbols ); From a9c8865f432ca8e2fb03538c0907a0d225119717 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:05 +0300 Subject: [PATCH 037/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 3f10fc6..e5dba78 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -141,3 +141,8 @@ EditAction 1475069565389 TestRomanNumerals.java 2229 16 21 5 UnitTestCaseAction 1475069567627 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069567628 TestRomanNumerals.java FAIL EditAction 1475069572046 RomanNumerals.java 829 1 4 0 +UnitTestCaseAction 1475069574040 TestRomanNumerals.java OK +UnitTestSessionAction 1475069574041 TestRomanNumerals.java OK +RefactoringAction 1475069582137 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_C()/2 METHOD +RefactoringAction 1475069584653 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_C()/2=>void test_I_cannot_be_subtracted_from_D() METHOD +EditAction 1475069585292 TestRomanNumerals.java 2371 17 22 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 3c31cf9..42bbef9 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -70,3 +70,4 @@ 1475069274663 test-first 3 16 true 1475069452266 refactoring 2A 6 true 1475069529331 refactoring 2A 3 true +1475069574041 test-first 3 16 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 3727c0f..540c1a0 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -18,3 +18,4 @@ 1475069274663 test-first 3 16 true 1475069452266 refactoring 2A 6 true 1475069529331 refactoring 2A 3 false +1475069574041 test-first 3 16 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index d2d3e3e..37d98b7 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -18,3 +18,4 @@ 1475069274663 test-first 3 23 true 1475069452266 refactoring 2A 177 true 1475069529331 refactoring 2A 77 true +1475069574041 test-first 3 44 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f84791a..52935d7 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -81,6 +81,11 @@ public void test_I_cannot_be_subtracted_from_C() { rn.convertToInteger("IC"); } + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_D() { + rn.convertToInteger("ID"); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_be_subtracted_twice() { rn.convertToInteger("IIV"); From 5f83ad17ace85d675ee6a30450368bc025d40ed3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:13 +0300 Subject: [PATCH 038/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index e5dba78..b503329 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -146,3 +146,6 @@ UnitTestSessionAction 1475069574041 TestRomanNumerals.java OK RefactoringAction 1475069582137 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_C()/2 METHOD RefactoringAction 1475069584653 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_C()/2=>void test_I_cannot_be_subtracted_from_D() METHOD EditAction 1475069585292 TestRomanNumerals.java 2371 17 22 5 +UnitTestCaseAction 1475069587202 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069587203 TestRomanNumerals.java FAIL +EditAction 1475069593171 RomanNumerals.java 826 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a9a56ff..8e9ec96 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|IC|" // can't subtract from too big numbers + + "IL|IC|ID|" // can't subtract from too big numbers + "I{2}V|" // can't subtract more than once + "VX" // can't subtract the '5' symbols ); From 699104ed038ee6085f8233887e0089bf7c4fae01 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:26 +0300 Subject: [PATCH 039/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 5 +++++ .besouro/20160928160607189/besouroEpisodes.txt | 1 + .besouro/20160928160607189/randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index b503329..8878f8f 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -149,3 +149,8 @@ EditAction 1475069585292 TestRomanNumerals.java 2371 17 22 5 UnitTestCaseAction 1475069587202 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069587203 TestRomanNumerals.java FAIL EditAction 1475069593171 RomanNumerals.java 826 1 4 0 +UnitTestCaseAction 1475069594964 TestRomanNumerals.java OK +UnitTestSessionAction 1475069594965 TestRomanNumerals.java OK +RefactoringAction 1475069602182 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_D()/2 METHOD +RefactoringAction 1475069605209 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_D()/2=>void test_I_cannot_be_subtracted_from_M() METHOD +EditAction 1475069605607 TestRomanNumerals.java 2513 18 23 5 diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index 42bbef9..ad79875 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -71,3 +71,4 @@ 1475069452266 refactoring 2A 6 true 1475069529331 refactoring 2A 3 true 1475069574041 test-first 3 16 true +1475069594965 test-first 3 12 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 540c1a0..436651b 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -19,3 +19,4 @@ 1475069452266 refactoring 2A 6 true 1475069529331 refactoring 2A 3 false 1475069574041 test-first 3 16 true +1475069594965 test-first 3 12 true diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 37d98b7..34faea5 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -19,3 +19,4 @@ 1475069452266 refactoring 2A 177 true 1475069529331 refactoring 2A 77 true 1475069574041 test-first 3 44 true +1475069594965 test-first 3 20 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 52935d7..7730cc1 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -86,6 +86,11 @@ public void test_I_cannot_be_subtracted_from_D() { rn.convertToInteger("ID"); } + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_M() { + rn.convertToInteger("IM"); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_be_subtracted_twice() { rn.convertToInteger("IIV"); From e13a4930910f3092116851a1a9b122783b976bad Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:33 +0300 Subject: [PATCH 040/117] besouro automatic message --- .besouro/20160928160607189/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index 8878f8f..b1d5620 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -154,3 +154,6 @@ UnitTestSessionAction 1475069594965 TestRomanNumerals.java OK RefactoringAction 1475069602182 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_D()/2 METHOD RefactoringAction 1475069605209 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_D()/2=>void test_I_cannot_be_subtracted_from_M() METHOD EditAction 1475069605607 TestRomanNumerals.java 2513 18 23 5 +UnitTestCaseAction 1475069607551 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069607552 TestRomanNumerals.java FAIL +EditAction 1475069613124 RomanNumerals.java 826 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8e9ec96..ed26c25 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|IC|ID|" // can't subtract from too big numbers + + "IL|IC|ID|IM|" // can't subtract from too big numbers + "I{2}V|" // can't subtract more than once + "VX" // can't subtract the '5' symbols ); From 8bd60e0b152a57dcd7700d53f1e011dd2be22b70 Mon Sep 17 00:00:00 2001 From: Matias Kinnunen Date: Wed, 28 Sep 2016 16:34:17 +0300 Subject: [PATCH 041/117] Assignment unfinished --- .besouro/20160928160607189/actions.txt | 2 + .../20160928160607189/besouroEpisodes.txt | 2 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20160928160607189/zorroEpisodes.txt | 1 + .classpath | 16 +- .gitattributes | 34 +-- .gitignore | 96 ++++---- .project | 34 +-- src/RomanNumerals.java | 60 ++--- tests/TestRomanNumerals.java | 208 +++++++++--------- 10 files changed, 230 insertions(+), 224 deletions(-) diff --git a/.besouro/20160928160607189/actions.txt b/.besouro/20160928160607189/actions.txt index b1d5620..5da40d8 100644 --- a/.besouro/20160928160607189/actions.txt +++ b/.besouro/20160928160607189/actions.txt @@ -157,3 +157,5 @@ EditAction 1475069605607 TestRomanNumerals.java 2513 18 23 5 UnitTestCaseAction 1475069607551 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069607552 TestRomanNumerals.java FAIL EditAction 1475069613124 RomanNumerals.java 826 1 4 0 +UnitTestCaseAction 1475069617105 TestRomanNumerals.java OK +UnitTestSessionAction 1475069617106 TestRomanNumerals.java OK diff --git a/.besouro/20160928160607189/besouroEpisodes.txt b/.besouro/20160928160607189/besouroEpisodes.txt index ad79875..3b53b5a 100644 --- a/.besouro/20160928160607189/besouroEpisodes.txt +++ b/.besouro/20160928160607189/besouroEpisodes.txt @@ -72,3 +72,5 @@ 1475069529331 refactoring 2A 3 true 1475069574041 test-first 3 16 true 1475069594965 test-first 3 12 true +1475069617106 test-addition 2 14 true +1475069617107 test-addition 1 14 true diff --git a/.besouro/20160928160607189/randomHeuristicEpisodes.txt b/.besouro/20160928160607189/randomHeuristicEpisodes.txt index 436651b..28d23be 100644 --- a/.besouro/20160928160607189/randomHeuristicEpisodes.txt +++ b/.besouro/20160928160607189/randomHeuristicEpisodes.txt @@ -20,3 +20,4 @@ 1475069529331 refactoring 2A 3 false 1475069574041 test-first 3 16 true 1475069594965 test-first 3 12 true +1475069617106 test-addition 2 14 false diff --git a/.besouro/20160928160607189/zorroEpisodes.txt b/.besouro/20160928160607189/zorroEpisodes.txt index 34faea5..47a0cad 100644 --- a/.besouro/20160928160607189/zorroEpisodes.txt +++ b/.besouro/20160928160607189/zorroEpisodes.txt @@ -20,3 +20,4 @@ 1475069529331 refactoring 2A 77 true 1475069574041 test-first 3 44 true 1475069594965 test-first 3 20 true +1475069617106 test-addition 2 22 true diff --git a/.classpath b/.classpath index b49ab80..b85cb56 100644 --- a/.classpath +++ b/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/.gitattributes b/.gitattributes index 7351b55..bdb0cab 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,17 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 0046b29..daae7a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,48 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk -/bin/ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +/bin/ diff --git a/.project b/.project index b749631..ae0e541 100644 --- a/.project +++ b/.project @@ -1,17 +1,17 @@ - - - RomanNumerals - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + RomanNumerals + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ed26c25..403281c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,30 +1,30 @@ -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class RomanNumerals { - public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("" - + "I{4}|X{4}|C{4}|M{4}|" // repeat limit - + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|IC|ID|IM|" // can't subtract from too big numbers - + "I{2}V|" // can't subtract more than once - + "VX" // can't subtract the '5' symbols - ); - Matcher m = p.matcher(romanNum); - if (m.find()) { - throw new IllegalArgumentException(); - } - - if (romanNum.equals("I")) { - return 1; - } else if (romanNum.equals("II")) { - return 2; - } else if (romanNum.equals("III")) { - return 3; - } else if (romanNum.equals("IV")) { - return 4; - } else { - return 6; - } - } -} +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class RomanNumerals { + public int convertToInteger(String romanNum) { + Pattern p = Pattern.compile("" + + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + + "V{2}|L{2}|D{2}|" // can't repeat + + "IL|IC|ID|IM|" // can't subtract from too big numbers + + "I{2}V|" // can't subtract more than once + + "VX" // can't subtract the '5' symbols + ); + Matcher m = p.matcher(romanNum); + if (m.find()) { + throw new IllegalArgumentException(); + } + + if (romanNum.equals("I")) { + return 1; + } else if (romanNum.equals("II")) { + return 2; + } else if (romanNum.equals("III")) { + return 3; + } else if (romanNum.equals("IV")) { + return 4; + } else { + return 6; + } + } +} diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7730cc1..dbd2426 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,104 +1,104 @@ -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TestRomanNumerals { - - RomanNumerals rn = new RomanNumerals(); - - @Test - public void test_I_1() { - int number = rn.convertToInteger("I"); - assertEquals(1, number); - } - - @Test - public void test_II_2() { - int number = rn.convertToInteger("II"); - assertEquals(2, number); - } - - @Test - public void test_III_3() { - int number = rn.convertToInteger("III"); - assertEquals(3, number); - } - - @Test - public void test_IV_4() { - int number = rn.convertToInteger("IV"); - assertEquals(4, number); - } - - @Test - public void test_VI_6() { - int number = rn.convertToInteger("VI"); - assertEquals(6, number); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_repeat_four_times() { - rn.convertToInteger("IIII"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_repeat_four_times() { - rn.convertToInteger("XXXX"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_C_cannot_repeat_four_times() { - rn.convertToInteger("CCCC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_M_cannot_repeat_four_times() { - rn.convertToInteger("MMMM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_repeat() { - rn.convertToInteger("VV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_repeat() { - rn.convertToInteger("LL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_D_cannot_repeat() { - rn.convertToInteger("DD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_L() { - rn.convertToInteger("IL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_C() { - rn.convertToInteger("IC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_D() { - rn.convertToInteger("ID"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_M() { - rn.convertToInteger("IM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_twice() { - rn.convertToInteger("IIV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_X() { - rn.convertToInteger("VX"); - } - -} +import static org.junit.Assert.*; + +import org.junit.Test; + +public class TestRomanNumerals { + + RomanNumerals rn = new RomanNumerals(); + + @Test + public void test_I_1() { + int number = rn.convertToInteger("I"); + assertEquals(1, number); + } + + @Test + public void test_II_2() { + int number = rn.convertToInteger("II"); + assertEquals(2, number); + } + + @Test + public void test_III_3() { + int number = rn.convertToInteger("III"); + assertEquals(3, number); + } + + @Test + public void test_IV_4() { + int number = rn.convertToInteger("IV"); + assertEquals(4, number); + } + + @Test + public void test_VI_6() { + int number = rn.convertToInteger("VI"); + assertEquals(6, number); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_repeat_four_times() { + rn.convertToInteger("IIII"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_repeat_four_times() { + rn.convertToInteger("XXXX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_repeat_four_times() { + rn.convertToInteger("CCCC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_M_cannot_repeat_four_times() { + rn.convertToInteger("MMMM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_repeat() { + rn.convertToInteger("VV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_repeat() { + rn.convertToInteger("LL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_repeat() { + rn.convertToInteger("DD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_L() { + rn.convertToInteger("IL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_C() { + rn.convertToInteger("IC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_D() { + rn.convertToInteger("ID"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_M() { + rn.convertToInteger("IM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice() { + rn.convertToInteger("IIV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_X() { + rn.convertToInteger("VX"); + } + +} From 044b07e8884b55580a490a16f63592cf8fbfffcd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:07:57 +0300 Subject: [PATCH 042/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 + .../20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/disagreements.txt | 0 .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/userComments.txt | 0 .besouro/20161005140534595/zorroEpisodes.txt | 1 + .classpath | 16 +- .gitattributes | 34 +-- .gitignore | 96 ++++---- .project | 34 +-- src/RomanNumerals.java | 60 ++--- tests/TestRomanNumerals.java | 213 +++++++++--------- 12 files changed, 239 insertions(+), 224 deletions(-) create mode 100644 .besouro/20161005140534595/actions.txt create mode 100644 .besouro/20161005140534595/besouroEpisodes.txt create mode 100644 .besouro/20161005140534595/disagreements.txt create mode 100644 .besouro/20161005140534595/randomHeuristicEpisodes.txt create mode 100644 .besouro/20161005140534595/userComments.txt create mode 100644 .besouro/20161005140534595/zorroEpisodes.txt diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt new file mode 100644 index 0000000..4fd4d28 --- /dev/null +++ b/.besouro/20161005140534595/actions.txt @@ -0,0 +1,7 @@ +FileOpenedAction 1475665534813 RomanNumerals.java 826 1 4 0 +FileOpenedAction 1475665545962 TestRomanNumerals.java 2513 18 23 5 +UnitTestCaseAction 1475665548852 TestRomanNumerals.java OK +UnitTestSessionAction 1475665548853 TestRomanNumerals.test_I_cannot_be_subtracted_from_M OK +RefactoringAction 1475665672032 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_X()/2 METHOD +RefactoringAction 1475665674573 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_X()/2=>void test_V_cannot_be_subtracted_from_L() METHOD +EditAction 1475665676832 TestRomanNumerals.java 2655 19 24 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt new file mode 100644 index 0000000..7cb35ee --- /dev/null +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -0,0 +1 @@ +1475665548853 regression 1 14 true diff --git a/.besouro/20161005140534595/disagreements.txt b/.besouro/20161005140534595/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..7cb35ee --- /dev/null +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475665548853 regression 1 14 true diff --git a/.besouro/20161005140534595/userComments.txt b/.besouro/20161005140534595/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt new file mode 100644 index 0000000..d8c49fa --- /dev/null +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -0,0 +1 @@ +1475665548853 regression 1 14 false diff --git a/.classpath b/.classpath index b85cb56..b49ab80 100644 --- a/.classpath +++ b/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/.gitattributes b/.gitattributes index bdb0cab..7351b55 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,17 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index daae7a9..0046b29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,48 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk -/bin/ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +/bin/ diff --git a/.project b/.project index ae0e541..b749631 100644 --- a/.project +++ b/.project @@ -1,17 +1,17 @@ - - - RomanNumerals - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + RomanNumerals + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 403281c..ed26c25 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,30 +1,30 @@ -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class RomanNumerals { - public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("" - + "I{4}|X{4}|C{4}|M{4}|" // repeat limit - + "V{2}|L{2}|D{2}|" // can't repeat - + "IL|IC|ID|IM|" // can't subtract from too big numbers - + "I{2}V|" // can't subtract more than once - + "VX" // can't subtract the '5' symbols - ); - Matcher m = p.matcher(romanNum); - if (m.find()) { - throw new IllegalArgumentException(); - } - - if (romanNum.equals("I")) { - return 1; - } else if (romanNum.equals("II")) { - return 2; - } else if (romanNum.equals("III")) { - return 3; - } else if (romanNum.equals("IV")) { - return 4; - } else { - return 6; - } - } -} +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class RomanNumerals { + public int convertToInteger(String romanNum) { + Pattern p = Pattern.compile("" + + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + + "V{2}|L{2}|D{2}|" // can't repeat + + "IL|IC|ID|IM|" // can't subtract from too big numbers + + "I{2}V|" // can't subtract more than once + + "VX" // can't subtract the '5' symbols + ); + Matcher m = p.matcher(romanNum); + if (m.find()) { + throw new IllegalArgumentException(); + } + + if (romanNum.equals("I")) { + return 1; + } else if (romanNum.equals("II")) { + return 2; + } else if (romanNum.equals("III")) { + return 3; + } else if (romanNum.equals("IV")) { + return 4; + } else { + return 6; + } + } +} diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index dbd2426..ca45d1d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,104 +1,109 @@ -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TestRomanNumerals { - - RomanNumerals rn = new RomanNumerals(); - - @Test - public void test_I_1() { - int number = rn.convertToInteger("I"); - assertEquals(1, number); - } - - @Test - public void test_II_2() { - int number = rn.convertToInteger("II"); - assertEquals(2, number); - } - - @Test - public void test_III_3() { - int number = rn.convertToInteger("III"); - assertEquals(3, number); - } - - @Test - public void test_IV_4() { - int number = rn.convertToInteger("IV"); - assertEquals(4, number); - } - - @Test - public void test_VI_6() { - int number = rn.convertToInteger("VI"); - assertEquals(6, number); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_repeat_four_times() { - rn.convertToInteger("IIII"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_repeat_four_times() { - rn.convertToInteger("XXXX"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_C_cannot_repeat_four_times() { - rn.convertToInteger("CCCC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_M_cannot_repeat_four_times() { - rn.convertToInteger("MMMM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_repeat() { - rn.convertToInteger("VV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_repeat() { - rn.convertToInteger("LL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_D_cannot_repeat() { - rn.convertToInteger("DD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_L() { - rn.convertToInteger("IL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_C() { - rn.convertToInteger("IC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_D() { - rn.convertToInteger("ID"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_M() { - rn.convertToInteger("IM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_twice() { - rn.convertToInteger("IIV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_X() { - rn.convertToInteger("VX"); - } - -} +import static org.junit.Assert.*; + +import org.junit.Test; + +public class TestRomanNumerals { + + RomanNumerals rn = new RomanNumerals(); + + @Test + public void test_I_1() { + int number = rn.convertToInteger("I"); + assertEquals(1, number); + } + + @Test + public void test_II_2() { + int number = rn.convertToInteger("II"); + assertEquals(2, number); + } + + @Test + public void test_III_3() { + int number = rn.convertToInteger("III"); + assertEquals(3, number); + } + + @Test + public void test_IV_4() { + int number = rn.convertToInteger("IV"); + assertEquals(4, number); + } + + @Test + public void test_VI_6() { + int number = rn.convertToInteger("VI"); + assertEquals(6, number); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_repeat_four_times() { + rn.convertToInteger("IIII"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_repeat_four_times() { + rn.convertToInteger("XXXX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_repeat_four_times() { + rn.convertToInteger("CCCC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_M_cannot_repeat_four_times() { + rn.convertToInteger("MMMM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_repeat() { + rn.convertToInteger("VV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_repeat() { + rn.convertToInteger("LL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_repeat() { + rn.convertToInteger("DD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_L() { + rn.convertToInteger("IL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_C() { + rn.convertToInteger("IC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_D() { + rn.convertToInteger("ID"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_M() { + rn.convertToInteger("IM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice() { + rn.convertToInteger("IIV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_X() { + rn.convertToInteger("VX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_L() { + rn.convertToInteger("VL"); + } + +} From 2b81249fd25be8613ccb8b9ef7cfdabcbf85179b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:08:22 +0300 Subject: [PATCH 043/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 2 ++ .besouro/20161005140534595/zorroEpisodes.txt | 2 ++ src/RomanNumerals.java | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 4fd4d28..53e7bad 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -5,3 +5,10 @@ UnitTestSessionAction 1475665548853 TestRomanNumerals.test_I_cannot_be_subtracte RefactoringAction 1475665672032 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_X()/2 METHOD RefactoringAction 1475665674573 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_X()/2=>void test_V_cannot_be_subtracted_from_L() METHOD EditAction 1475665676832 TestRomanNumerals.java 2655 19 24 5 +UnitTestCaseAction 1475665682549 TestRomanNumerals.java OK +UnitTestSessionAction 1475665682550 TestRomanNumerals.test_I_cannot_be_subtracted_from_M OK +UnitTestCaseAction 1475665686887 TestRomanNumerals.java OK +UnitTestSessionAction 1475665686888 TestRomanNumerals.test_I_cannot_be_subtracted_from_M OK +UnitTestCaseAction 1475665691747 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665691749 TestRomanNumerals.java FAIL +EditAction 1475665702246 RomanNumerals.java 829 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 7cb35ee..40ef3eb 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -1 +1,3 @@ 1475665548853 regression 1 14 true +1475665682550 test-addition 1 10 true +1475665686888 regression 1 0 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 7cb35ee..f8e4249 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -1 +1,3 @@ 1475665548853 regression 1 14 true +1475665682550 test-addition 1 10 false +1475665686888 regression 1 0 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index d8c49fa..f630719 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -1 +1,3 @@ 1475665548853 regression 1 14 false +1475665682550 test-addition 1 133 false +1475665686888 regression 1 4 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ed26c25..d66a1ed 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,7 @@ public int convertToInteger(String romanNum) { + "V{2}|L{2}|D{2}|" // can't repeat + "IL|IC|ID|IM|" // can't subtract from too big numbers + "I{2}V|" // can't subtract more than once - + "VX" // can't subtract the '5' symbols + + "VX|VL" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From c739fdd13aa73af04634db9614d405ed48e456d5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:08:43 +0300 Subject: [PATCH 044/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 4 ++-- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 53e7bad..12b364a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -12,3 +12,6 @@ UnitTestSessionAction 1475665686888 TestRomanNumerals.test_I_cannot_be_subtracte UnitTestCaseAction 1475665691747 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665691749 TestRomanNumerals.java FAIL EditAction 1475665702246 RomanNumerals.java 829 1 4 0 +UnitTestCaseAction 1475665704736 TestRomanNumerals.java OK +UnitTestSessionAction 1475665704738 TestRomanNumerals.java OK +EditAction 1475665723073 RomanNumerals.java 826 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 40ef3eb..b853d8d 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -1,3 +1,4 @@ 1475665548853 regression 1 14 true 1475665682550 test-addition 1 10 true 1475665686888 regression 1 0 true +1475665704738 refactoring 2A 12 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index f8e4249..c312072 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1475665548853 regression 1 14 true 1475665682550 test-addition 1 10 false 1475665686888 regression 1 0 false +1475665704738 refactoring 2A 12 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index f630719..e93a8b9 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1475665548853 regression 1 14 false 1475665682550 test-addition 1 133 false 1475665686888 regression 1 4 false +1475665704738 refactoring 2A 17 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d66a1ed..dd0697d 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,10 +5,10 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit - + "V{2}|L{2}|D{2}|" // can't repeat + + "VV|LL|DD|" // can't repeat + "IL|IC|ID|IM|" // can't subtract from too big numbers + "I{2}V|" // can't subtract more than once - + "VX|VL" // can't subtract the '5' symbols + + "VX|VL" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 935b1c3655a8b2b8486e7c1cee5f1992a9e949fd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:08:56 +0300 Subject: [PATCH 045/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 12b364a..a76ed39 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -15,3 +15,6 @@ EditAction 1475665702246 RomanNumerals.java 829 1 4 0 UnitTestCaseAction 1475665704736 TestRomanNumerals.java OK UnitTestSessionAction 1475665704738 TestRomanNumerals.java OK EditAction 1475665723073 RomanNumerals.java 826 1 4 0 +UnitTestCaseAction 1475665725649 TestRomanNumerals.java OK +UnitTestSessionAction 1475665725651 TestRomanNumerals.java OK +EditAction 1475665735325 RomanNumerals.java 826 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index b853d8d..21e0f03 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -2,3 +2,4 @@ 1475665682550 test-addition 1 10 true 1475665686888 regression 1 0 true 1475665704738 refactoring 2A 12 true +1475665725651 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index c312072..0cd8ff6 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -2,3 +2,4 @@ 1475665682550 test-addition 1 10 false 1475665686888 regression 1 0 false 1475665704738 refactoring 2A 12 true +1475665725651 refactoring 2A 2 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index e93a8b9..ae003e2 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -2,3 +2,4 @@ 1475665682550 test-addition 1 133 false 1475665686888 regression 1 4 false 1475665704738 refactoring 2A 17 false +1475665725651 refactoring 2A 20 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index dd0697d..6f3f697 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -7,7 +7,7 @@ public int convertToInteger(String romanNum) { + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat + "IL|IC|ID|IM|" // can't subtract from too big numbers - + "I{2}V|" // can't subtract more than once + + "IIV|" // can't subtract more than once + "VX|VL" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); From 1c05e89b26de7beb500aee7bfe716593687d60d5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:09:20 +0300 Subject: [PATCH 046/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a76ed39..97ffe3b 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -18,3 +18,6 @@ EditAction 1475665723073 RomanNumerals.java 826 1 4 0 UnitTestCaseAction 1475665725649 TestRomanNumerals.java OK UnitTestSessionAction 1475665725651 TestRomanNumerals.java OK EditAction 1475665735325 RomanNumerals.java 826 1 4 0 +UnitTestCaseAction 1475665737991 TestRomanNumerals.java OK +UnitTestSessionAction 1475665737992 TestRomanNumerals.java OK +EditAction 1475665760148 RomanNumerals.java 840 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 21e0f03..076fbf3 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -3,3 +3,4 @@ 1475665686888 regression 1 0 true 1475665704738 refactoring 2A 12 true 1475665725651 refactoring 2A 2 true +1475665737992 regression 1 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 0cd8ff6..ef92d61 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -3,3 +3,4 @@ 1475665686888 regression 1 0 false 1475665704738 refactoring 2A 12 true 1475665725651 refactoring 2A 2 false +1475665737992 regression 1 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index ae003e2..e9ab352 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -3,3 +3,4 @@ 1475665686888 regression 1 4 false 1475665704738 refactoring 2A 17 false 1475665725651 refactoring 2A 20 false +1475665737992 regression 1 12 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 6f3f697..0844608 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,7 +5,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit - + "VV|LL|DD|" // can't repeat + + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once + "VX|VL" // can't subtract the '5' symbols From a0c5494d7ec74d1e1c6a9ff809ba405ee731660c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:09:34 +0300 Subject: [PATCH 047/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 97ffe3b..bd2acb3 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -21,3 +21,8 @@ EditAction 1475665735325 RomanNumerals.java 826 1 4 0 UnitTestCaseAction 1475665737991 TestRomanNumerals.java OK UnitTestSessionAction 1475665737992 TestRomanNumerals.java OK EditAction 1475665760148 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665762408 TestRomanNumerals.java OK +UnitTestSessionAction 1475665762409 TestRomanNumerals.java OK +RefactoringAction 1475665770238 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_L()/2 METHOD +RefactoringAction 1475665772296 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_L()/2=>void test_V_cannot_be_subtracted_from_C() METHOD +EditAction 1475665773889 TestRomanNumerals.java 2797 20 25 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 076fbf3..952a656 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -4,3 +4,4 @@ 1475665704738 refactoring 2A 12 true 1475665725651 refactoring 2A 2 true 1475665737992 regression 1 2 true +1475665762409 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index ef92d61..61ddbca 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -4,3 +4,4 @@ 1475665704738 refactoring 2A 12 true 1475665725651 refactoring 2A 2 false 1475665737992 regression 1 2 true +1475665762409 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index e9ab352..bcd2711 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -4,3 +4,4 @@ 1475665704738 refactoring 2A 17 false 1475665725651 refactoring 2A 20 false 1475665737992 regression 1 12 false +1475665762409 refactoring 2A 24 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index ca45d1d..aa4b711 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -105,5 +105,10 @@ public void test_V_cannot_be_subtracted_from_X() { public void test_V_cannot_be_subtracted_from_L() { rn.convertToInteger("VL"); } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_C() { + rn.convertToInteger("VC"); + } } From 801701fd1917e1a1460f943a56cb02ac2d87a5e0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:09:44 +0300 Subject: [PATCH 048/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index bd2acb3..857e479 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -26,3 +26,6 @@ UnitTestSessionAction 1475665762409 TestRomanNumerals.java OK RefactoringAction 1475665770238 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_L()/2 METHOD RefactoringAction 1475665772296 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_L()/2=>void test_V_cannot_be_subtracted_from_C() METHOD EditAction 1475665773889 TestRomanNumerals.java 2797 20 25 5 +UnitTestCaseAction 1475665776552 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665776554 TestRomanNumerals.java FAIL +EditAction 1475665784015 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 0844608..f753122 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,7 @@ public int convertToInteger(String romanNum) { + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once - + "VX|VL" // can't subtract the '5' symbols + + "VX|VL|VC" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 6ffb7ceec986a3e819ab4239f9f35d622290a0ea Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:10:00 +0300 Subject: [PATCH 049/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 857e479..a7bb9c4 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -29,3 +29,8 @@ EditAction 1475665773889 TestRomanNumerals.java 2797 20 25 5 UnitTestCaseAction 1475665776552 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665776554 TestRomanNumerals.java FAIL EditAction 1475665784015 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665787072 TestRomanNumerals.java OK +UnitTestSessionAction 1475665787073 TestRomanNumerals.java OK +RefactoringAction 1475665796887 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_C()/2 METHOD +RefactoringAction 1475665798910 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_C()/2=>void test_V_cannot_be_subtracted_from_D() METHOD +EditAction 1475665799668 TestRomanNumerals.java 2939 21 26 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 952a656..01423bd 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -5,3 +5,5 @@ 1475665725651 refactoring 2A 2 true 1475665737992 regression 1 2 true 1475665762409 refactoring 2A 2 true +1475665787073 test-addition 2 16 true +1475665787074 test-addition 1 16 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 61ddbca..1f99cc7 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -5,3 +5,4 @@ 1475665725651 refactoring 2A 2 false 1475665737992 regression 1 2 true 1475665762409 refactoring 2A 2 true +1475665787073 test-addition 2 16 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index bcd2711..7bedae5 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -5,3 +5,4 @@ 1475665725651 refactoring 2A 20 false 1475665737992 regression 1 12 false 1475665762409 refactoring 2A 24 false +1475665787073 test-addition 2 24 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index aa4b711..9576dc6 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -110,5 +110,10 @@ public void test_V_cannot_be_subtracted_from_L() { public void test_V_cannot_be_subtracted_from_C() { rn.convertToInteger("VC"); } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_D() { + rn.convertToInteger("VD"); + } } From 6fa3df0a04e070a1a2de55e95996fabb560c0c4a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:10:15 +0300 Subject: [PATCH 050/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a7bb9c4..a3f0632 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -34,3 +34,6 @@ UnitTestSessionAction 1475665787073 TestRomanNumerals.java OK RefactoringAction 1475665796887 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_C()/2 METHOD RefactoringAction 1475665798910 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_C()/2=>void test_V_cannot_be_subtracted_from_D() METHOD EditAction 1475665799668 TestRomanNumerals.java 2939 21 26 5 +UnitTestCaseAction 1475665805282 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665805283 TestRomanNumerals.java FAIL +EditAction 1475665814819 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f753122..bfd4ba6 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,7 @@ public int convertToInteger(String romanNum) { + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once - + "VX|VL|VC" // can't subtract the '5' symbols + + "VX|VL|VC|VD" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 1e9c4b891f0738a20bdcac1e10aa5ee3348df195 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:10:32 +0300 Subject: [PATCH 051/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a3f0632..ba5fa1f 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -37,3 +37,8 @@ EditAction 1475665799668 TestRomanNumerals.java 2939 21 26 5 UnitTestCaseAction 1475665805282 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665805283 TestRomanNumerals.java FAIL EditAction 1475665814819 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665819305 TestRomanNumerals.java OK +UnitTestSessionAction 1475665819306 TestRomanNumerals.java OK +RefactoringAction 1475665827489 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_D()/2 METHOD +RefactoringAction 1475665830013 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_D()/2=>void test_V_cannot_be_subtracted_from_M() METHOD +EditAction 1475665831908 TestRomanNumerals.java 3081 22 27 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 01423bd..efa015c 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -7,3 +7,5 @@ 1475665762409 refactoring 2A 2 true 1475665787073 test-addition 2 16 true 1475665787074 test-addition 1 16 true +1475665819306 test-addition 2 22 true +1475665819307 test-addition 1 22 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 1f99cc7..33f3340 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -6,3 +6,4 @@ 1475665737992 regression 1 2 true 1475665762409 refactoring 2A 2 true 1475665787073 test-addition 2 16 false +1475665819306 test-addition 2 22 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 7bedae5..4dd892d 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -6,3 +6,4 @@ 1475665737992 regression 1 12 false 1475665762409 refactoring 2A 24 false 1475665787073 test-addition 2 24 false +1475665819306 test-addition 2 32 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 9576dc6..39ab694 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -115,5 +115,10 @@ public void test_V_cannot_be_subtracted_from_C() { public void test_V_cannot_be_subtracted_from_D() { rn.convertToInteger("VD"); } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_M() { + rn.convertToInteger("VM"); + } } From dd9eddc4ebb6d85115f1b56fe470cf02e8e52920 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:10:39 +0300 Subject: [PATCH 052/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index ba5fa1f..42dfb3b 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -42,3 +42,6 @@ UnitTestSessionAction 1475665819306 TestRomanNumerals.java OK RefactoringAction 1475665827489 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_D()/2 METHOD RefactoringAction 1475665830013 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_D()/2=>void test_V_cannot_be_subtracted_from_M() METHOD EditAction 1475665831908 TestRomanNumerals.java 3081 22 27 5 +UnitTestCaseAction 1475665834373 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665834374 TestRomanNumerals.java FAIL +EditAction 1475665838551 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index bfd4ba6..ab5a012 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,7 @@ public int convertToInteger(String romanNum) { + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once - + "VX|VL|VC|VD" // can't subtract the '5' symbols + + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 54243454b869335abc71ec73b1bd26b8c297e8ee Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:11:18 +0300 Subject: [PATCH 053/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 42dfb3b..448f6eb 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -45,3 +45,9 @@ EditAction 1475665831908 TestRomanNumerals.java 3081 22 27 5 UnitTestCaseAction 1475665834373 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665834374 TestRomanNumerals.java FAIL EditAction 1475665838551 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665841683 TestRomanNumerals.java OK +UnitTestSessionAction 1475665841684 TestRomanNumerals.java OK +RefactoringAction 1475665867565 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_from_L()/2 METHOD +RefactoringAction 1475665870085 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_L()/2=>void test_X_cannot_be_subtracted_from_L() METHOD +RefactoringAction 1475665873605 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_from_L()=>void test_X_cannot_be_subtracted_from_D() METHOD +EditAction 1475665877843 TestRomanNumerals.java 3223 23 28 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index efa015c..cf5c377 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -9,3 +9,5 @@ 1475665787074 test-addition 1 16 true 1475665819306 test-addition 2 22 true 1475665819307 test-addition 1 22 true +1475665841684 test-addition 2 14 true +1475665841685 test-addition 1 14 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 33f3340..1f25b75 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -7,3 +7,4 @@ 1475665762409 refactoring 2A 2 true 1475665787073 test-addition 2 16 false 1475665819306 test-addition 2 22 false +1475665841684 test-addition 2 14 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 4dd892d..4db89a6 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -7,3 +7,4 @@ 1475665762409 refactoring 2A 24 false 1475665787073 test-addition 2 24 false 1475665819306 test-addition 2 32 false +1475665841684 test-addition 2 22 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 39ab694..4ba823c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -120,5 +120,10 @@ public void test_V_cannot_be_subtracted_from_D() { public void test_V_cannot_be_subtracted_from_M() { rn.convertToInteger("VM"); } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_from_D() { + rn.convertToInteger("XD"); + } } From 093545776e55eecd0fbf39c2f7b6ab317043f290 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:11:29 +0300 Subject: [PATCH 054/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 448f6eb..812ad69 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -51,3 +51,6 @@ RefactoringAction 1475665867565 TestRomanNumerals.java ADD void test_I_cannot_be RefactoringAction 1475665870085 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_from_L()/2=>void test_X_cannot_be_subtracted_from_L() METHOD RefactoringAction 1475665873605 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_from_L()=>void test_X_cannot_be_subtracted_from_D() METHOD EditAction 1475665877843 TestRomanNumerals.java 3223 23 28 5 +UnitTestCaseAction 1475665880361 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665880362 TestRomanNumerals.java FAIL +EditAction 1475665888452 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ab5a012..5f4812c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat these symbols - + "IL|IC|ID|IM|" // can't subtract from too big numbers + + "IL|IC|ID|IM|XD|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); From 807bd6d8bcbf57cba0a5dbda9044704135c2c009 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:11:47 +0300 Subject: [PATCH 055/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 812ad69..56f65e1 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -54,3 +54,8 @@ EditAction 1475665877843 TestRomanNumerals.java 3223 23 28 5 UnitTestCaseAction 1475665880361 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665880362 TestRomanNumerals.java FAIL EditAction 1475665888452 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665891827 TestRomanNumerals.java OK +UnitTestSessionAction 1475665891828 TestRomanNumerals.java OK +RefactoringAction 1475665899644 TestRomanNumerals.java ADD void test_X_cannot_be_subtracted_from_D()/2 METHOD +RefactoringAction 1475665901664 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_from_D()/2=>void test_X_cannot_be_subtracted_from_M() METHOD +EditAction 1475665906818 TestRomanNumerals.java 3365 24 29 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index cf5c377..8b9d468 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -11,3 +11,5 @@ 1475665819307 test-addition 1 22 true 1475665841684 test-addition 2 14 true 1475665841685 test-addition 1 14 true +1475665891828 test-addition 2 24 true +1475665891829 test-addition 1 24 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 1f25b75..8b766c3 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -8,3 +8,4 @@ 1475665787073 test-addition 2 16 false 1475665819306 test-addition 2 22 false 1475665841684 test-addition 2 14 false +1475665891828 test-addition 2 24 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 4db89a6..c92c1ac 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -8,3 +8,4 @@ 1475665787073 test-addition 2 24 false 1475665819306 test-addition 2 32 false 1475665841684 test-addition 2 22 false +1475665891828 test-addition 2 50 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 4ba823c..fe8ad1f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -125,5 +125,10 @@ public void test_V_cannot_be_subtracted_from_M() { public void test_X_cannot_be_subtracted_from_D() { rn.convertToInteger("XD"); } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_from_M() { + rn.convertToInteger("XM"); + } } From b7ef37ad5d1c3794125a744885aeacb879219153 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:11:56 +0300 Subject: [PATCH 056/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 56f65e1..a7b5c8f 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -59,3 +59,6 @@ UnitTestSessionAction 1475665891828 TestRomanNumerals.java OK RefactoringAction 1475665899644 TestRomanNumerals.java ADD void test_X_cannot_be_subtracted_from_D()/2 METHOD RefactoringAction 1475665901664 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_from_D()/2=>void test_X_cannot_be_subtracted_from_M() METHOD EditAction 1475665906818 TestRomanNumerals.java 3365 24 29 5 +UnitTestCaseAction 1475665909508 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475665909509 TestRomanNumerals.java FAIL +EditAction 1475665915671 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 5f4812c..4027e8c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,7 +6,7 @@ public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat these symbols - + "IL|IC|ID|IM|XD|" // can't subtract from too big numbers + + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers + "IIV|" // can't subtract more than once + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); From c5f57f571b5063aad70d7d3652c043a8a03cac43 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:13:36 +0300 Subject: [PATCH 057/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 7 ++++++- 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a7b5c8f..aeda1cd 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -62,3 +62,10 @@ EditAction 1475665906818 TestRomanNumerals.java 3365 24 29 5 UnitTestCaseAction 1475665909508 TestRomanNumerals.java FAIL UnitTestSessionAction 1475665909509 TestRomanNumerals.java FAIL EditAction 1475665915671 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475665919638 TestRomanNumerals.java OK +UnitTestSessionAction 1475665919639 TestRomanNumerals.java OK +RefactoringAction 1475666004204 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice()=>void test_I_cannot_be_subtracted_twice_fromV() METHOD +RefactoringAction 1475666005726 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_fromV()=>void test_I_cannot_be_subtracted_twice_from_V() METHOD +RefactoringAction 1475666010247 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_twice_from_V()/2 METHOD +RefactoringAction 1475666011766 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_V()/2=>void test_I_cannot_be_subtracted_twice_from_X() METHOD +EditAction 1475666015898 TestRomanNumerals.java 3521 25 30 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 8b9d468..03b51ed 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -13,3 +13,5 @@ 1475665841685 test-addition 1 14 true 1475665891828 test-addition 2 24 true 1475665891829 test-addition 1 24 true +1475665919639 test-addition 2 19 true +1475665919640 test-addition 1 19 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 8b766c3..4de8124 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -9,3 +9,4 @@ 1475665819306 test-addition 2 22 false 1475665841684 test-addition 2 14 false 1475665891828 test-addition 2 24 false +1475665919639 test-addition 2 19 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index c92c1ac..a6c9d68 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -9,3 +9,4 @@ 1475665819306 test-addition 2 32 false 1475665841684 test-addition 2 22 false 1475665891828 test-addition 2 50 false +1475665919639 test-addition 2 27 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index fe8ad1f..044584b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -92,10 +92,15 @@ public void test_I_cannot_be_subtracted_from_M() { } @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_twice() { + public void test_I_cannot_be_subtracted_twice_from_V() { rn.convertToInteger("IIV"); } + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice_from_X() { + rn.convertToInteger("IIX"); + } + @Test (expected = IllegalArgumentException.class) public void test_V_cannot_be_subtracted_from_X() { rn.convertToInteger("VX"); From 5557473a57722ed8cd363083d5387d69159fb25a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:13:47 +0300 Subject: [PATCH 058/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index aeda1cd..a5d6983 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -69,3 +69,6 @@ RefactoringAction 1475666005726 TestRomanNumerals.java RENAME test_I_cannot_be_s RefactoringAction 1475666010247 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_twice_from_V()/2 METHOD RefactoringAction 1475666011766 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_V()/2=>void test_I_cannot_be_subtracted_twice_from_X() METHOD EditAction 1475666015898 TestRomanNumerals.java 3521 25 30 5 +UnitTestCaseAction 1475666018990 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666018991 TestRomanNumerals.java FAIL +EditAction 1475666026481 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4027e8c..17ceb81 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -7,7 +7,7 @@ public int convertToInteger(String romanNum) { + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers - + "IIV|" // can't subtract more than once + + "IIV|IIX|" // can't subtract more than once + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); From 36aa0a4196bbd271ca156cc42cfa0abdbea4e3f2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:14:26 +0300 Subject: [PATCH 059/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a5d6983..ab06f7e 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -72,3 +72,9 @@ EditAction 1475666015898 TestRomanNumerals.java 3521 25 30 5 UnitTestCaseAction 1475666018990 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666018991 TestRomanNumerals.java FAIL EditAction 1475666026481 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475666030162 TestRomanNumerals.java OK +UnitTestSessionAction 1475666030163 TestRomanNumerals.java OK +RefactoringAction 1475666046802 TestRomanNumerals.java ADD void test_I_cannot_be_subtracted_twice_from_V()/2 METHOD +RefactoringAction 1475666058325 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_V()/2=>void test_I_cannot_be_subtracted_twice_from_L() METHOD +RefactoringAction 1475666060845 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_L()=>void test_X_cannot_be_subtracted_twice_from_L() METHOD +EditAction 1475666065928 TestRomanNumerals.java 3670 26 31 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 03b51ed..2c8f2b3 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -15,3 +15,5 @@ 1475665891829 test-addition 1 24 true 1475665919639 test-addition 2 19 true 1475665919640 test-addition 1 19 true +1475666030163 test-addition 2 25 true +1475666030164 test-addition 1 25 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 4de8124..60e7eca 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -10,3 +10,4 @@ 1475665841684 test-addition 2 14 false 1475665891828 test-addition 2 24 false 1475665919639 test-addition 2 19 false +1475666030163 test-addition 2 25 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index a6c9d68..acde7c7 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -10,3 +10,4 @@ 1475665841684 test-addition 2 22 false 1475665891828 test-addition 2 50 false 1475665919639 test-addition 2 27 false +1475666030163 test-addition 2 110 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 044584b..a438c81 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -135,5 +135,10 @@ public void test_X_cannot_be_subtracted_from_D() { public void test_X_cannot_be_subtracted_from_M() { rn.convertToInteger("XM"); } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_twice_from_L() { + rn.convertToInteger("XXL"); + } } From d527f7804e09803a3de43db17738b93c6ac9cddb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:14:39 +0300 Subject: [PATCH 060/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index ab06f7e..dbde2be 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -78,3 +78,6 @@ RefactoringAction 1475666046802 TestRomanNumerals.java ADD void test_I_cannot_be RefactoringAction 1475666058325 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_V()/2=>void test_I_cannot_be_subtracted_twice_from_L() METHOD RefactoringAction 1475666060845 TestRomanNumerals.java RENAME test_I_cannot_be_subtracted_twice_from_L()=>void test_X_cannot_be_subtracted_twice_from_L() METHOD EditAction 1475666065928 TestRomanNumerals.java 3670 26 31 5 +UnitTestCaseAction 1475666068387 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666068388 TestRomanNumerals.java FAIL +EditAction 1475666079022 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 17ceb81..5957a6a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -7,7 +7,7 @@ public int convertToInteger(String romanNum) { + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers - + "IIV|IIX|" // can't subtract more than once + + "IIV|IIX|XXL|" // can't subtract more than once + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); From 92bde8c2bb9965e2c7a66f6e9e2b720e918f57ef Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:15:00 +0300 Subject: [PATCH 061/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index dbde2be..0cac5ac 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -81,3 +81,8 @@ EditAction 1475666065928 TestRomanNumerals.java 3670 26 31 5 UnitTestCaseAction 1475666068387 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666068388 TestRomanNumerals.java FAIL EditAction 1475666079022 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475666081486 TestRomanNumerals.java OK +UnitTestSessionAction 1475666081487 TestRomanNumerals.java OK +RefactoringAction 1475666095381 TestRomanNumerals.java ADD void test_X_cannot_be_subtracted_twice_from_L()/2 METHOD +RefactoringAction 1475666097899 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_twice_from_L()/2=>void test_X_cannot_be_subtracted_twice_from_C() METHOD +EditAction 1475666100161 TestRomanNumerals.java 3819 27 32 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 2c8f2b3..d141dbc 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -17,3 +17,5 @@ 1475665919640 test-addition 1 19 true 1475666030163 test-addition 2 25 true 1475666030164 test-addition 1 25 true +1475666081487 test-addition 2 34 true +1475666081488 test-addition 1 34 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 60e7eca..61ae921 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -11,3 +11,4 @@ 1475665891828 test-addition 2 24 false 1475665919639 test-addition 2 19 false 1475666030163 test-addition 2 25 false +1475666081487 test-addition 2 34 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index acde7c7..2230873 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -11,3 +11,4 @@ 1475665891828 test-addition 2 50 false 1475665919639 test-addition 2 27 false 1475666030163 test-addition 2 110 false +1475666081487 test-addition 2 51 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a438c81..943082d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -140,5 +140,10 @@ public void test_X_cannot_be_subtracted_from_M() { public void test_X_cannot_be_subtracted_twice_from_L() { rn.convertToInteger("XXL"); } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_twice_from_C() { + rn.convertToInteger("XXC"); + } } From 12c60a8ddf825e35f56225e2b2a82d49ac223310 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:15:09 +0300 Subject: [PATCH 062/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 0cac5ac..e0a685a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -86,3 +86,6 @@ UnitTestSessionAction 1475666081487 TestRomanNumerals.java OK RefactoringAction 1475666095381 TestRomanNumerals.java ADD void test_X_cannot_be_subtracted_twice_from_L()/2 METHOD RefactoringAction 1475666097899 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_twice_from_L()/2=>void test_X_cannot_be_subtracted_twice_from_C() METHOD EditAction 1475666100161 TestRomanNumerals.java 3819 27 32 5 +UnitTestCaseAction 1475666103475 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666103476 TestRomanNumerals.java FAIL +EditAction 1475666108982 RomanNumerals.java 840 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 5957a6a..cbac5bf 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -7,7 +7,7 @@ public int convertToInteger(String romanNum) { + "I{4}|X{4}|C{4}|M{4}|" // repeat limit + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers - + "IIV|IIX|XXL|" // can't subtract more than once + + "IIV|IIX|XXL|XXC|" // can't subtract more than once + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols ); Matcher m = p.matcher(romanNum); From 1c659e24517efc0d8f1166c9cd4babf1f438f750 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:17:12 +0300 Subject: [PATCH 063/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index e0a685a..b1f50c0 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -89,3 +89,9 @@ EditAction 1475666100161 TestRomanNumerals.java 3819 27 32 5 UnitTestCaseAction 1475666103475 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666103476 TestRomanNumerals.java FAIL EditAction 1475666108982 RomanNumerals.java 840 1 4 0 +UnitTestCaseAction 1475666111262 TestRomanNumerals.java OK +UnitTestSessionAction 1475666111263 TestRomanNumerals.java OK +RefactoringAction 1475666223448 TestRomanNumerals.java ADD void test_V_cannot_be_subtracted_from_X()/2 METHOD +RefactoringAction 1475666226465 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_X()/2=>void test_L_cannot_be_subtracted_from_X() METHOD +RefactoringAction 1475666229984 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_X()=>void test_L_cannot_be_subtracted_from_C() METHOD +EditAction 1475666231536 TestRomanNumerals.java 3961 28 33 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index d141dbc..2b47e03 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -19,3 +19,5 @@ 1475666030164 test-addition 1 25 true 1475666081487 test-addition 2 34 true 1475666081488 test-addition 1 34 true +1475666111263 test-addition 2 15 true +1475666111264 test-addition 1 15 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 61ae921..944c365 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -12,3 +12,4 @@ 1475665919639 test-addition 2 19 false 1475666030163 test-addition 2 25 false 1475666081487 test-addition 2 34 true +1475666111263 test-addition 2 15 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 2230873..a9c9c08 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -12,3 +12,4 @@ 1475665919639 test-addition 2 27 false 1475666030163 test-addition 2 110 false 1475666081487 test-addition 2 51 false +1475666111263 test-addition 2 29 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 943082d..64eee6b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -145,5 +145,10 @@ public void test_X_cannot_be_subtracted_twice_from_L() { public void test_X_cannot_be_subtracted_twice_from_C() { rn.convertToInteger("XXC"); } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_C() { + rn.convertToInteger("LC"); + } } From 6810177d37f37e31acf541a96b50d1379a5c3f88 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:17:40 +0300 Subject: [PATCH 064/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index b1f50c0..7a128a5 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -95,3 +95,6 @@ RefactoringAction 1475666223448 TestRomanNumerals.java ADD void test_V_cannot_be RefactoringAction 1475666226465 TestRomanNumerals.java RENAME test_V_cannot_be_subtracted_from_X()/2=>void test_L_cannot_be_subtracted_from_X() METHOD RefactoringAction 1475666229984 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_X()=>void test_L_cannot_be_subtracted_from_C() METHOD EditAction 1475666231536 TestRomanNumerals.java 3961 28 33 5 +UnitTestCaseAction 1475666234000 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666234001 TestRomanNumerals.java FAIL +EditAction 1475666260126 RomanNumerals.java 905 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index cbac5bf..a1dc2ee 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,8 @@ public int convertToInteger(String romanNum) { + "VV|LL|DD|" // can't repeat these symbols + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers + "IIV|IIX|XXL|XXC|" // can't subtract more than once - + "VX|VL|VC|VD|VM" // can't subtract the '5' symbols + + "VX|VL|VC|VD|VM|" // can't subtract the '5' symbols + + "LC" // can't subtract the '50' symbols ); Matcher m = p.matcher(romanNum); if (m.find()) { From 3417faf64ea71cd0ab42c0ac20aa6dd226c63c83 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:18:29 +0300 Subject: [PATCH 065/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 ++ .../20161005140534595/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 31 ++++++++++--------- src/RomanNumerals.java | 23 ++++++++++---- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 7a128a5..0cf4f97 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -98,3 +98,6 @@ EditAction 1475666231536 TestRomanNumerals.java 3961 28 33 5 UnitTestCaseAction 1475666234000 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666234001 TestRomanNumerals.java FAIL EditAction 1475666260126 RomanNumerals.java 905 1 4 0 +UnitTestCaseAction 1475666263018 TestRomanNumerals.java OK +UnitTestSessionAction 1475666263019 TestRomanNumerals.java OK +EditAction 1475666308423 RomanNumerals.java 925 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 2b47e03..8ab25cb 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -21,3 +21,4 @@ 1475666081488 test-addition 1 34 true 1475666111263 test-addition 2 15 true 1475666111264 test-addition 1 15 true +1475666263019 test-first 3 39 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 944c365..6374f8f 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -13,3 +13,4 @@ 1475666030163 test-addition 2 25 false 1475666081487 test-addition 2 34 true 1475666111263 test-addition 2 15 false +1475666263019 test-first 3 39 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index a9c9c08..c9e7f6c 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -1,15 +1,16 @@ -1475665548853 regression 1 14 false -1475665682550 test-addition 1 133 false -1475665686888 regression 1 4 false -1475665704738 refactoring 2A 17 false -1475665725651 refactoring 2A 20 false -1475665737992 regression 1 12 false -1475665762409 refactoring 2A 24 false -1475665787073 test-addition 2 24 false -1475665819306 test-addition 2 32 false -1475665841684 test-addition 2 22 false -1475665891828 test-addition 2 50 false -1475665919639 test-addition 2 27 false -1475666030163 test-addition 2 110 false -1475666081487 test-addition 2 51 false -1475666111263 test-addition 2 29 false +1475665548853 regression 1 14 true +1475665682550 test-addition 1 133 true +1475665686888 regression 1 4 true +1475665704738 refactoring 2A 17 true +1475665725651 refactoring 2A 20 true +1475665737992 regression 1 12 true +1475665762409 refactoring 2A 24 true +1475665787073 test-addition 2 24 true +1475665819306 test-addition 2 32 true +1475665841684 test-addition 2 22 true +1475665891828 test-addition 2 50 true +1475665919639 test-addition 2 27 true +1475666030163 test-addition 2 110 true +1475666081487 test-addition 2 51 true +1475666111263 test-addition 2 29 true +1475666263019 test-first 3 151 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a1dc2ee..8b4d5e4 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,12 +4,23 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { Pattern p = Pattern.compile("" - + "I{4}|X{4}|C{4}|M{4}|" // repeat limit - + "VV|LL|DD|" // can't repeat these symbols - + "IL|IC|ID|IM|XD|XM|" // can't subtract from too big numbers - + "IIV|IIX|XXL|XXC|" // can't subtract more than once - + "VX|VL|VC|VD|VM|" // can't subtract the '5' symbols - + "LC" // can't subtract the '50' symbols + // repeat limit + + "I{4}|X{4}|C{4}|M{4}|" + + // can't repeat these symbols + + "VV|LL|DD|" + + // can't subtract from too big numbers + + "IL|IC|ID|IM|XD|XM|" + + // can't subtract more than once + + "IIV|IIX|XXL|XXC|" + + // can't subtract the '5' symbols + + "VX|VL|VC|VD|VM|" + + // can't subtract the '50' symbols + + "LC" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 2f488c0ec75d8aee5d51953d9ad10941e58604d4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:18:43 +0300 Subject: [PATCH 066/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 0cf4f97..2423099 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -101,3 +101,8 @@ EditAction 1475666260126 RomanNumerals.java 905 1 4 0 UnitTestCaseAction 1475666263018 TestRomanNumerals.java OK UnitTestSessionAction 1475666263019 TestRomanNumerals.java OK EditAction 1475666308423 RomanNumerals.java 925 1 4 0 +UnitTestCaseAction 1475666310970 TestRomanNumerals.java OK +UnitTestSessionAction 1475666310971 TestRomanNumerals.java OK +RefactoringAction 1475666320034 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_C()/2 METHOD +RefactoringAction 1475666322052 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_C()/2=>void test_L_cannot_be_subtracted_from_D() METHOD +EditAction 1475666323230 TestRomanNumerals.java 4103 29 34 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 8ab25cb..65c53d7 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -22,3 +22,4 @@ 1475666111263 test-addition 2 15 true 1475666111264 test-addition 1 15 true 1475666263019 test-first 3 39 true +1475666310971 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 6374f8f..b772640 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -14,3 +14,4 @@ 1475666081487 test-addition 2 34 true 1475666111263 test-addition 2 15 false 1475666263019 test-first 3 39 true +1475666310971 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index c9e7f6c..4fe8caa 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -14,3 +14,4 @@ 1475666081487 test-addition 2 51 true 1475666111263 test-addition 2 29 true 1475666263019 test-first 3 151 true +1475666310971 refactoring 2A 47 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 64eee6b..19aea7a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -150,5 +150,10 @@ public void test_X_cannot_be_subtracted_twice_from_C() { public void test_L_cannot_be_subtracted_from_C() { rn.convertToInteger("LC"); } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_D() { + rn.convertToInteger("LD"); + } } From b94a46c322c5aae924d1068dc04a97c5371fa04b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:18:51 +0300 Subject: [PATCH 067/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 2423099..c78df2a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -106,3 +106,6 @@ UnitTestSessionAction 1475666310971 TestRomanNumerals.java OK RefactoringAction 1475666320034 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_C()/2 METHOD RefactoringAction 1475666322052 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_C()/2=>void test_L_cannot_be_subtracted_from_D() METHOD EditAction 1475666323230 TestRomanNumerals.java 4103 29 34 5 +UnitTestCaseAction 1475666325411 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666325412 TestRomanNumerals.java FAIL +EditAction 1475666331180 RomanNumerals.java 928 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8b4d5e4..37d9c3f 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -20,7 +20,7 @@ public int convertToInteger(String romanNum) { + "VX|VL|VC|VD|VM|" // can't subtract the '50' symbols - + "LC" + + "LC|LD" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 3fc8386497b4ca2d2b0ae2cecbb129f96f0bcfc3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:19:09 +0300 Subject: [PATCH 068/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index c78df2a..ba17f33 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -109,3 +109,8 @@ EditAction 1475666323230 TestRomanNumerals.java 4103 29 34 5 UnitTestCaseAction 1475666325411 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666325412 TestRomanNumerals.java FAIL EditAction 1475666331180 RomanNumerals.java 928 1 4 0 +UnitTestCaseAction 1475666335018 TestRomanNumerals.java OK +UnitTestSessionAction 1475666335019 TestRomanNumerals.java OK +RefactoringAction 1475666342081 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_D()/2 METHOD +RefactoringAction 1475666347629 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_D()/2=>void test_L_cannot_be_subtracted_from_M() METHOD +EditAction 1475666348425 TestRomanNumerals.java 4245 30 35 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 65c53d7..1344bf2 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -23,3 +23,4 @@ 1475666111264 test-addition 1 15 true 1475666263019 test-first 3 39 true 1475666310971 refactoring 2A 2 true +1475666335019 test-first 3 14 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index b772640..035fbfe 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -15,3 +15,4 @@ 1475666111263 test-addition 2 15 false 1475666263019 test-first 3 39 true 1475666310971 refactoring 2A 2 true +1475666335019 test-first 3 14 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 4fe8caa..e4a84af 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -15,3 +15,4 @@ 1475666111263 test-addition 2 29 true 1475666263019 test-first 3 151 true 1475666310971 refactoring 2A 47 true +1475666335019 test-first 3 24 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 19aea7a..972931e 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -155,5 +155,10 @@ public void test_L_cannot_be_subtracted_from_C() { public void test_L_cannot_be_subtracted_from_D() { rn.convertToInteger("LD"); } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_M() { + rn.convertToInteger("LM"); + } } From 7a4c8012eead5007c2ada0e1eb01350f9108fdff Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:19:14 +0300 Subject: [PATCH 069/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index ba17f33..4359569 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -114,3 +114,6 @@ UnitTestSessionAction 1475666335019 TestRomanNumerals.java OK RefactoringAction 1475666342081 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_D()/2 METHOD RefactoringAction 1475666347629 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_D()/2=>void test_L_cannot_be_subtracted_from_M() METHOD EditAction 1475666348425 TestRomanNumerals.java 4245 30 35 5 +UnitTestCaseAction 1475666351037 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666351038 TestRomanNumerals.java FAIL +EditAction 1475666354168 RomanNumerals.java 931 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 37d9c3f..64280b2 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -20,7 +20,7 @@ public int convertToInteger(String romanNum) { + "VX|VL|VC|VD|VM|" // can't subtract the '50' symbols - + "LC|LD" + + "LC|LD|LM" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 925c49e469678e66d80028a3763d606e2750910b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:19:49 +0300 Subject: [PATCH 070/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 4359569..18be828 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -117,3 +117,9 @@ EditAction 1475666348425 TestRomanNumerals.java 4245 30 35 5 UnitTestCaseAction 1475666351037 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666351038 TestRomanNumerals.java FAIL EditAction 1475666354168 RomanNumerals.java 931 1 4 0 +UnitTestCaseAction 1475666356506 TestRomanNumerals.java OK +UnitTestSessionAction 1475666356507 TestRomanNumerals.java OK +RefactoringAction 1475666378649 TestRomanNumerals.java ADD void test_X_cannot_be_subtracted_twice_from_L()/2 METHOD +RefactoringAction 1475666381167 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_twice_from_L()/2=>void test_C_cannot_be_subtracted_twice_from_L() METHOD +RefactoringAction 1475666384188 TestRomanNumerals.java RENAME test_C_cannot_be_subtracted_twice_from_L()=>void test_C_cannot_be_subtracted_twice_from_D() METHOD +EditAction 1475666388624 TestRomanNumerals.java 4394 31 36 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 1344bf2..930340f 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -24,3 +24,4 @@ 1475666263019 test-first 3 39 true 1475666310971 refactoring 2A 2 true 1475666335019 test-first 3 14 true +1475666356507 test-first 3 14 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 035fbfe..4e224d1 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -16,3 +16,4 @@ 1475666263019 test-first 3 39 true 1475666310971 refactoring 2A 2 true 1475666335019 test-first 3 14 true +1475666356507 test-first 3 14 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index e4a84af..b39e113 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -16,3 +16,4 @@ 1475666263019 test-first 3 151 true 1475666310971 refactoring 2A 47 true 1475666335019 test-first 3 24 true +1475666356507 test-first 3 21 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 972931e..f405ca0 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -160,5 +160,10 @@ public void test_L_cannot_be_subtracted_from_D() { public void test_L_cannot_be_subtracted_from_M() { rn.convertToInteger("LM"); } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_be_subtracted_twice_from_D() { + rn.convertToInteger("CCD"); + } } From b8f185d2241f905d064e9a29d995cbc45ad05925 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:20:03 +0300 Subject: [PATCH 071/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 18be828..09cd868 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -123,3 +123,6 @@ RefactoringAction 1475666378649 TestRomanNumerals.java ADD void test_X_cannot_be RefactoringAction 1475666381167 TestRomanNumerals.java RENAME test_X_cannot_be_subtracted_twice_from_L()/2=>void test_C_cannot_be_subtracted_twice_from_L() METHOD RefactoringAction 1475666384188 TestRomanNumerals.java RENAME test_C_cannot_be_subtracted_twice_from_L()=>void test_C_cannot_be_subtracted_twice_from_D() METHOD EditAction 1475666388624 TestRomanNumerals.java 4394 31 36 5 +UnitTestCaseAction 1475666391103 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666391104 TestRomanNumerals.java FAIL +EditAction 1475666402462 RomanNumerals.java 935 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 64280b2..e032155 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -14,7 +14,7 @@ public int convertToInteger(String romanNum) { + "IL|IC|ID|IM|XD|XM|" // can't subtract more than once - + "IIV|IIX|XXL|XXC|" + + "IIV|IIX|XXL|XXC|CCD|" // can't subtract the '5' symbols + "VX|VL|VC|VD|VM|" From 1766608bdafbac47852b62347091672ff8cf9971 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:20:19 +0300 Subject: [PATCH 072/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 2 ++ .besouro/20161005140534595/zorroEpisodes.txt | 2 ++ tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 18 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 09cd868..44e8833 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -126,3 +126,10 @@ EditAction 1475666388624 TestRomanNumerals.java 4394 31 36 5 UnitTestCaseAction 1475666391103 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666391104 TestRomanNumerals.java FAIL EditAction 1475666402462 RomanNumerals.java 935 1 4 0 +UnitTestCaseAction 1475666405907 TestRomanNumerals.java OK +UnitTestSessionAction 1475666405910 TestRomanNumerals (Failed Tests first) OK +UnitTestCaseAction 1475666406831 TestRomanNumerals.java OK +UnitTestSessionAction 1475666406834 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475666414221 TestRomanNumerals.java ADD void test_C_cannot_be_subtracted_twice_from_D()/2 METHOD +RefactoringAction 1475666417740 TestRomanNumerals.java RENAME test_C_cannot_be_subtracted_twice_from_D()/2=>void test_C_cannot_be_subtracted_twice_from_M() METHOD +EditAction 1475666418936 TestRomanNumerals.java 4543 32 37 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 930340f..63bd777 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -25,3 +25,5 @@ 1475666310971 refactoring 2A 2 true 1475666335019 test-first 3 14 true 1475666356507 test-first 3 14 true +1475666405910 test-first 3 27 true +1475666406834 regression 1 0 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 4e224d1..2b112fc 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -17,3 +17,5 @@ 1475666310971 refactoring 2A 2 true 1475666335019 test-first 3 14 true 1475666356507 test-first 3 14 true +1475666405910 test-first 3 27 true +1475666406834 regression 1 0 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index b39e113..78a0d74 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -17,3 +17,5 @@ 1475666310971 refactoring 2A 47 true 1475666335019 test-first 3 24 true 1475666356507 test-first 3 21 true +1475666405910 test-first 3 49 true +1475666406834 regression 1 0 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f405ca0..002da4d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -165,5 +165,10 @@ public void test_L_cannot_be_subtracted_from_M() { public void test_C_cannot_be_subtracted_twice_from_D() { rn.convertToInteger("CCD"); } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_be_subtracted_twice_from_M() { + rn.convertToInteger("CCM"); + } } From e3faf0ae74b699d6c1bf2e35488f1859fe26ccd1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:20:26 +0300 Subject: [PATCH 073/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 44e8833..c001129 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -133,3 +133,6 @@ UnitTestSessionAction 1475666406834 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475666414221 TestRomanNumerals.java ADD void test_C_cannot_be_subtracted_twice_from_D()/2 METHOD RefactoringAction 1475666417740 TestRomanNumerals.java RENAME test_C_cannot_be_subtracted_twice_from_D()/2=>void test_C_cannot_be_subtracted_twice_from_M() METHOD EditAction 1475666418936 TestRomanNumerals.java 4543 32 37 5 +UnitTestCaseAction 1475666421345 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666421346 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475666425790 RomanNumerals.java 939 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e032155..3fb8012 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -14,7 +14,7 @@ public int convertToInteger(String romanNum) { + "IL|IC|ID|IM|XD|XM|" // can't subtract more than once - + "IIV|IIX|XXL|XXC|CCD|" + + "IIV|IIX|XXL|XXC|CCD|CCM|" // can't subtract the '5' symbols + "VX|VL|VC|VD|VM|" From 9f45b4e845f3b32cb629340e1ecc5043663b032f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:20:55 +0300 Subject: [PATCH 074/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index c001129..f55bb6d 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -136,3 +136,8 @@ EditAction 1475666418936 TestRomanNumerals.java 4543 32 37 5 UnitTestCaseAction 1475666421345 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666421346 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475666425790 RomanNumerals.java 939 1 4 0 +UnitTestCaseAction 1475666428070 TestRomanNumerals.java OK +UnitTestSessionAction 1475666428072 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475666450269 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_M()/2 METHOD +RefactoringAction 1475666452786 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_M()/2=>void test_D_cannot_be_subtracted_from_M() METHOD +EditAction 1475666455299 TestRomanNumerals.java 4685 33 38 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 63bd777..c55d9eb 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -27,3 +27,4 @@ 1475666356507 test-first 3 14 true 1475666405910 test-first 3 27 true 1475666406834 regression 1 0 true +1475666428072 test-first 3 13 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 2b112fc..f795838 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -19,3 +19,4 @@ 1475666356507 test-first 3 14 true 1475666405910 test-first 3 27 true 1475666406834 regression 1 0 false +1475666428072 test-first 3 13 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 78a0d74..5c650bb 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -19,3 +19,4 @@ 1475666356507 test-first 3 21 true 1475666405910 test-first 3 49 true 1475666406834 regression 1 0 true +1475666428072 test-first 3 21 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 002da4d..0c7737f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -170,5 +170,10 @@ public void test_C_cannot_be_subtracted_twice_from_D() { public void test_C_cannot_be_subtracted_twice_from_M() { rn.convertToInteger("CCM"); } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_be_subtracted_from_M() { + rn.convertToInteger("DM"); + } } From d5cf4d5f0d8c33ffece47241eb5cb1f49356ef8c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:21:22 +0300 Subject: [PATCH 075/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index f55bb6d..d721d96 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -141,3 +141,6 @@ UnitTestSessionAction 1475666428072 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475666450269 TestRomanNumerals.java ADD void test_L_cannot_be_subtracted_from_M()/2 METHOD RefactoringAction 1475666452786 TestRomanNumerals.java RENAME test_L_cannot_be_subtracted_from_M()/2=>void test_D_cannot_be_subtracted_from_M() METHOD EditAction 1475666455299 TestRomanNumerals.java 4685 33 38 5 +UnitTestCaseAction 1475666457598 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666457599 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475666481431 RomanNumerals.java 886 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 3fb8012..eddeddd 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -17,10 +17,7 @@ public int convertToInteger(String romanNum) { + "IIV|IIX|XXL|XXC|CCD|CCM|" // can't subtract the '5' symbols - + "VX|VL|VC|VD|VM|" - - // can't subtract the '50' symbols - + "LC|LD|LM" + + "VX|VL|VC|VD|VM|LC|LD|LM|DM" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 07cc3f77a16c8a31559c9fb5fb6a65c2d6ab2edf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:22:45 +0300 Subject: [PATCH 076/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index d721d96..68790f8 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -144,3 +144,8 @@ EditAction 1475666455299 TestRomanNumerals.java 4685 33 38 5 UnitTestCaseAction 1475666457598 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666457599 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475666481431 RomanNumerals.java 886 1 4 0 +UnitTestCaseAction 1475666485066 TestRomanNumerals.java OK +UnitTestSessionAction 1475666485067 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475666553822 TestRomanNumerals.java ADD void test_D_cannot_be_subtracted_from_M()/2 METHOD +RefactoringAction 1475666560840 TestRomanNumerals.java RENAME test_D_cannot_be_subtracted_from_M()/2=>void test_numbers() METHOD +EditAction 1475666564253 TestRomanNumerals.java 4806 34 39 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index c55d9eb..660396c 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -28,3 +28,4 @@ 1475666405910 test-first 3 27 true 1475666406834 regression 1 0 true 1475666428072 test-first 3 13 true +1475666485067 test-first 3 34 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index f795838..f5228dd 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -20,3 +20,4 @@ 1475666405910 test-first 3 27 true 1475666406834 regression 1 0 false 1475666428072 test-first 3 13 true +1475666485067 test-first 3 34 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 5c650bb..3669355 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -20,3 +20,4 @@ 1475666405910 test-first 3 49 true 1475666406834 regression 1 0 true 1475666428072 test-first 3 21 true +1475666485067 test-first 3 56 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 0c7737f..283f13e 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -175,5 +175,10 @@ public void test_C_cannot_be_subtracted_twice_from_M() { public void test_D_cannot_be_subtracted_from_M() { rn.convertToInteger("DM"); } + + @Test (expected = IllegalArgumentException.class) + public void test_numbers() { + rn.convertToInteger("123"); + } } From 3f44568f501df3f5ca58c91916e75174b776adbf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:23:24 +0300 Subject: [PATCH 077/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 68790f8..725e162 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -149,3 +149,6 @@ UnitTestSessionAction 1475666485067 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475666553822 TestRomanNumerals.java ADD void test_D_cannot_be_subtracted_from_M()/2 METHOD RefactoringAction 1475666560840 TestRomanNumerals.java RENAME test_D_cannot_be_subtracted_from_M()/2=>void test_numbers() METHOD EditAction 1475666564253 TestRomanNumerals.java 4806 34 39 5 +UnitTestCaseAction 1475666567057 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666567058 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475666603612 RomanNumerals.java 952 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index eddeddd..1e4d76f 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -17,7 +17,10 @@ public int convertToInteger(String romanNum) { + "IIV|IIX|XXL|XXC|CCD|CCM|" // can't subtract the '5' symbols - + "VX|VL|VC|VD|VM|LC|LD|LM|DM" + + "VX|VL|VC|VD|VM|LC|LD|LM|DM|" + + // other than the allowed symbols + + "[^IVXLCDM]" ); Matcher m = p.matcher(romanNum); if (m.find()) { From fe25598e3a044debecb189a8201ec87acd2a6516 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:23:54 +0300 Subject: [PATCH 078/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 725e162..600cf94 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -152,3 +152,6 @@ EditAction 1475666564253 TestRomanNumerals.java 4806 34 39 5 UnitTestCaseAction 1475666567057 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666567058 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475666603612 RomanNumerals.java 952 1 4 0 +UnitTestCaseAction 1475666607332 TestRomanNumerals.java OK +UnitTestSessionAction 1475666607333 Rerun TestRomanNumerals (Failed Tests first) OK +EditAction 1475666633610 RomanNumerals.java 945 1 4 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 660396c..397ccc5 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -29,3 +29,4 @@ 1475666406834 regression 1 0 true 1475666428072 test-first 3 13 true 1475666485067 test-first 3 34 true +1475666607333 test-first 3 53 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index f5228dd..76ddd96 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -21,3 +21,4 @@ 1475666406834 regression 1 0 false 1475666428072 test-first 3 13 true 1475666485067 test-first 3 34 true +1475666607333 test-first 3 53 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 3669355..eac6faa 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -21,3 +21,4 @@ 1475666406834 regression 1 0 true 1475666428072 test-first 3 21 true 1475666485067 test-first 3 56 true +1475666607333 test-first 3 122 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1e4d76f..8ce61de 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -20,7 +20,7 @@ public int convertToInteger(String romanNum) { + "VX|VL|VC|VD|VM|LC|LD|LM|DM|" // other than the allowed symbols - + "[^IVXLCDM]" + + "\\d" ); Matcher m = p.matcher(romanNum); if (m.find()) { From a4a04bcdcf2fb8a85e81fecf3dc8a3bd7b7a8467 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:24:31 +0300 Subject: [PATCH 079/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 600cf94..2962998 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -155,3 +155,9 @@ EditAction 1475666603612 RomanNumerals.java 952 1 4 0 UnitTestCaseAction 1475666607332 TestRomanNumerals.java OK UnitTestSessionAction 1475666607333 Rerun TestRomanNumerals (Failed Tests first) OK EditAction 1475666633610 RomanNumerals.java 945 1 4 0 +UnitTestCaseAction 1475666636301 TestRomanNumerals.java OK +UnitTestSessionAction 1475666636302 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475666645918 TestRomanNumerals.java ADD void test_numbers()/2 METHOD +RefactoringAction 1475666648436 TestRomanNumerals.java RENAME test_numbers()/2=>void test_t() METHOD +RefactoringAction 1475666651960 TestRomanNumerals.java RENAME test_t()=>void test_other_letters() METHOD +EditAction 1475666670363 TestRomanNumerals.java 4935 35 40 5 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 397ccc5..81ca762 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -30,3 +30,4 @@ 1475666428072 test-first 3 13 true 1475666485067 test-first 3 34 true 1475666607333 test-first 3 53 true +1475666636302 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 76ddd96..2c5e478 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -22,3 +22,4 @@ 1475666428072 test-first 3 13 true 1475666485067 test-first 3 34 true 1475666607333 test-first 3 53 true +1475666636302 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index eac6faa..03694b8 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -22,3 +22,4 @@ 1475666428072 test-first 3 21 true 1475666485067 test-first 3 56 true 1475666607333 test-first 3 122 true +1475666636302 refactoring 2A 28 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 283f13e..badda7c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -180,5 +180,10 @@ public void test_D_cannot_be_subtracted_from_M() { public void test_numbers() { rn.convertToInteger("123"); } + + @Test (expected = IllegalArgumentException.class) + public void test_other_letters() { + rn.convertToInteger("ABEFG"); + } } From 61f98dc5a0f1e43c38a6852c907c28f6c45a73c0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:24:52 +0300 Subject: [PATCH 080/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 2962998..85c1de3 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -161,3 +161,6 @@ RefactoringAction 1475666645918 TestRomanNumerals.java ADD void test_numbers()/2 RefactoringAction 1475666648436 TestRomanNumerals.java RENAME test_numbers()/2=>void test_t() METHOD RefactoringAction 1475666651960 TestRomanNumerals.java RENAME test_t()=>void test_other_letters() METHOD EditAction 1475666670363 TestRomanNumerals.java 4935 35 40 5 +UnitTestCaseAction 1475666689062 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475666689063 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475666691644 RomanNumerals.java 952 1 4 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8ce61de..1e4d76f 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -20,7 +20,7 @@ public int convertToInteger(String romanNum) { + "VX|VL|VC|VD|VM|LC|LD|LM|DM|" // other than the allowed symbols - + "\\d" + + "[^IVXLCDM]" ); Matcher m = p.matcher(romanNum); if (m.find()) { From 685c140a68dbed3ff401ac62a2c90681b33a6cdc Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:29:20 +0300 Subject: [PATCH 081/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .../20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 15 ++++++++------- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 85c1de3..1a37978 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -164,3 +164,8 @@ EditAction 1475666670363 TestRomanNumerals.java 4935 35 40 5 UnitTestCaseAction 1475666689062 TestRomanNumerals.java FAIL UnitTestSessionAction 1475666689063 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475666691644 RomanNumerals.java 952 1 4 0 +UnitTestCaseAction 1475666694158 TestRomanNumerals.java OK +UnitTestSessionAction 1475666694159 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475666764389 RomanNumerals.java ADD import java.lang.reflect.Array IMPORT +RefactoringAction 1475666770783 RomanNumerals.java REMOVE import java.lang.reflect.Array IMPORT +EditAction 1475666959484 RomanNumerals.java 1065 1 5 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 81ca762..6fa0072 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -31,3 +31,4 @@ 1475666485067 test-first 3 34 true 1475666607333 test-first 3 53 true 1475666636302 refactoring 2A 2 true +1475666694159 test-first 3 48 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 2c5e478..f5438d4 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -23,3 +23,4 @@ 1475666485067 test-first 3 34 true 1475666607333 test-first 3 53 true 1475666636302 refactoring 2A 2 true +1475666694159 test-first 3 48 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 03694b8..7f08f37 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -23,3 +23,4 @@ 1475666485067 test-first 3 56 true 1475666607333 test-first 3 122 true 1475666636302 refactoring 2A 28 true +1475666694159 test-first 3 57 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1e4d76f..eaaa7ae 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -3,25 +3,26 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - Pattern p = Pattern.compile("" + String patternString = String.join("|", // repeat limit - + "I{4}|X{4}|C{4}|M{4}|" + "I{4}", "X{4}", "C{4}", "M{4}", // can't repeat these symbols - + "VV|LL|DD|" + "VV", "LL", "DD", // can't subtract from too big numbers - + "IL|IC|ID|IM|XD|XM|" + "IL", "IC", "ID", "IM", "XD", "XM", // can't subtract more than once - + "IIV|IIX|XXL|XXC|CCD|CCM|" + "IIV", "IIX", "XXL", "XXC", "CCD", "CCM", // can't subtract the '5' symbols - + "VX|VL|VC|VD|VM|LC|LD|LM|DM|" + "VX", "VL", "VC", "VD", "VM", "LC", "LD", "LM", "DM", // other than the allowed symbols - + "[^IVXLCDM]" + "[^IVXLCDM]" ); + Pattern p = Pattern.compile(patternString); Matcher m = p.matcher(romanNum); if (m.find()) { throw new IllegalArgumentException(); From f51282dd9676db7c62d03f9af3bdfa407a18e8b1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:29:56 +0300 Subject: [PATCH 082/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 +- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 1a37978..6752683 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -169,3 +169,6 @@ UnitTestSessionAction 1475666694159 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475666764389 RomanNumerals.java ADD import java.lang.reflect.Array IMPORT RefactoringAction 1475666770783 RomanNumerals.java REMOVE import java.lang.reflect.Array IMPORT EditAction 1475666959484 RomanNumerals.java 1065 1 5 0 +UnitTestCaseAction 1475666962664 TestRomanNumerals.java OK +UnitTestSessionAction 1475666962665 Rerun TestRomanNumerals (Failed Tests first) OK +EditAction 1475666996279 RomanNumerals.java 1065 1 5 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 6fa0072..7cf925e 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -32,3 +32,4 @@ 1475666607333 test-first 3 53 true 1475666636302 refactoring 2A 2 true 1475666694159 test-first 3 48 true +1475666962665 production 1 198 false diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index f5438d4..668cc00 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -24,3 +24,4 @@ 1475666607333 test-first 3 53 true 1475666636302 refactoring 2A 2 true 1475666694159 test-first 3 48 true +1475666962665 production 1 198 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 7f08f37..5f6a971 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -24,3 +24,4 @@ 1475666607333 test-first 3 122 true 1475666636302 refactoring 2A 28 true 1475666694159 test-first 3 57 true +1475666962665 production 1 268 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index eaaa7ae..fcdec8e 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,7 +5,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { String patternString = String.join("|", // repeat limit - "I{4}", "X{4}", "C{4}", "M{4}", + "IIII", "XXXX", "CCCC", "MMMM", // can't repeat these symbols "VV", "LL", "DD", From bae36e9ec6736bce2b8b7312ac32d04c51f3e8f7 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:31:17 +0300 Subject: [PATCH 083/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .../20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 11 ++++++++--- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 6752683..48cd4a5 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -172,3 +172,6 @@ EditAction 1475666959484 RomanNumerals.java 1065 1 5 0 UnitTestCaseAction 1475666962664 TestRomanNumerals.java OK UnitTestSessionAction 1475666962665 Rerun TestRomanNumerals (Failed Tests first) OK EditAction 1475666996279 RomanNumerals.java 1065 1 5 0 +UnitTestCaseAction 1475666998976 TestRomanNumerals.java OK +UnitTestSessionAction 1475666998977 Rerun TestRomanNumerals (Failed Tests first) OK +EditAction 1475667076558 RomanNumerals.java 1090 1 5 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 7cf925e..3be08bd 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -33,3 +33,4 @@ 1475666636302 refactoring 2A 2 true 1475666694159 test-first 3 48 true 1475666962665 production 1 198 false +1475666998977 regression 1 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 668cc00..cb5d10c 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -25,3 +25,4 @@ 1475666636302 refactoring 2A 2 true 1475666694159 test-first 3 48 true 1475666962665 production 1 198 true +1475666998977 regression 1 2 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 5f6a971..fc1a971 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -25,3 +25,4 @@ 1475666636302 refactoring 2A 28 true 1475666694159 test-first 3 57 true 1475666962665 production 1 268 true +1475666998977 regression 1 36 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index fcdec8e..4f89429 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -11,13 +11,18 @@ public int convertToInteger(String romanNum) { "VV", "LL", "DD", // can't subtract from too big numbers - "IL", "IC", "ID", "IM", "XD", "XM", + "IL", "IC", "ID", "IM", + "XD", "XM", // can't subtract more than once - "IIV", "IIX", "XXL", "XXC", "CCD", "CCM", + "IIV", "IIX", + "XXL", "XXC", + "CCD", "CCM", // can't subtract the '5' symbols - "VX", "VL", "VC", "VD", "VM", "LC", "LD", "LM", "DM", + "VX", "VL", "VC", "VD", "VM", + "LC", "LD", "LM", + "DM", // other than the allowed symbols "[^IVXLCDM]" From 13b1fd1c0879b250860373fd63937300ff3a900a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:01:17 +0300 Subject: [PATCH 084/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 32 +++++++++++ .../20161005140534595/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 57 ++++++++++++++++--- 5 files changed, 83 insertions(+), 9 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 48cd4a5..96ffcf7 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -175,3 +175,35 @@ EditAction 1475666996279 RomanNumerals.java 1065 1 5 0 UnitTestCaseAction 1475666998976 TestRomanNumerals.java OK UnitTestSessionAction 1475666998977 Rerun TestRomanNumerals (Failed Tests first) OK EditAction 1475667076558 RomanNumerals.java 1090 1 5 0 +UnitTestCaseAction 1475667079946 TestRomanNumerals.java OK +UnitTestSessionAction 1475667079948 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475667258154 RomanNumerals.java RENAME convertToInteger(String)=>enum Numb null +RefactoringAction 1475667260677 RomanNumerals.java RENAME Numb=>enum Numeral null +FileOpenedAction 1475667266950 TennisGame.java 2180 6 14 0 +FileOpenedAction 1475667312428 SudokuVerifier.java 2266 1 8 0 +RefactoringAction 1475667410775 RomanNumerals.java ADD Numeral I FIELD +RefactoringAction 1475667413292 RomanNumerals.java ADD Numeral V FIELD +RefactoringAction 1475667440314 RomanNumerals.java ADD int number FIELD +RefactoringAction 1475667452380 RomanNumerals.java ADD Numeral(int) METHOD +RefactoringAction 1475667464950 RomanNumerals.java ADD Numeral X FIELD +RefactoringAction 1475667473970 RomanNumerals.java ADD Numeral L FIELD +RefactoringAction 1475667477488 RomanNumerals.java ADD Numeral C FIELD +RefactoringAction 1475667482508 RomanNumerals.java ADD Numeral D FIELD +RefactoringAction 1475667485529 RomanNumerals.java ADD Numeral M FIELD +RefactoringAction 1475667572573 RomanNumerals.java ADD int value() METHOD +RefactoringAction 1475668009742 RomanNumerals.java ADD Map numerals FIELD +RefactoringAction 1475668034494 RomanNumerals.java ADD import java.util.Map IMPORT +RefactoringAction 1475668039917 RomanNumerals.java ADD import java.util.HashMap IMPORT +CompilationAction 1475668271675 RomanNumerals.java +CompilationAction 1475668271676 RomanNumerals.java +CompilationAction 1475668271677 RomanNumerals.java +CompilationAction 1475668271678 RomanNumerals.java +CompilationAction 1475668271679 RomanNumerals.java +CompilationAction 1475668271680 RomanNumerals.java +CompilationAction 1475668271681 RomanNumerals.java +RefactoringAction 1475668358598 RomanNumerals.java REMOVE numerals FIELD +CompilationAction 1475668608897 RomanNumerals.java +CompilationAction 1475668608898 RomanNumerals.java +UnitTestCaseAction 1475668610989 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668610993 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475668876741 RomanNumerals.java 1857 3 7 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 3be08bd..acc88b3 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -34,3 +34,4 @@ 1475666694159 test-first 3 48 true 1475666962665 production 1 198 false 1475666998977 regression 1 2 true +1475667079948 refactoring 2A 3 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index cb5d10c..fbf992d 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -26,3 +26,4 @@ 1475666694159 test-first 3 48 true 1475666962665 production 1 198 true 1475666998977 regression 1 2 false +1475667079948 refactoring 2A 3 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index fc1a971..000a891 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -26,3 +26,4 @@ 1475666694159 test-first 3 57 true 1475666962665 production 1 268 true 1475666998977 regression 1 36 true +1475667079948 refactoring 2A 80 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4f89429..d35d46a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,7 +1,29 @@ +import java.util.HashMap; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public class RomanNumerals { + private enum Numeral { + I(1), + V(5), + X(10), + L(50), + C(100), + D(500), + M(1000); + + private int number; + + private Numeral(int number) { + this.number = number; + } + + public int value() { + return this.number; + } + } + public int convertToInteger(String romanNum) { String patternString = String.join("|", // repeat limit @@ -33,16 +55,33 @@ public int convertToInteger(String romanNum) { throw new IllegalArgumentException(); } - if (romanNum.equals("I")) { - return 1; - } else if (romanNum.equals("II")) { - return 2; - } else if (romanNum.equals("III")) { + for (int i = 0; i < romanNum.length(); i++) { + String numeral = String.valueOf(romanNum.charAt(i)); + int number = Numeral.valueOf(numeral).value(); + + // last numeral + if (i + 1 == romanNum.length()) { + return number; + } + + String nextNumeral = String.valueOf(romanNum.charAt(i + 1)); + int nextNumber = Numeral.valueOf(nextNumeral).value(); + + // subtract or add + if (number < nextNumber) { + return nextNumber - number; + } else if (number > nextNumber) { + return number + nextNumber; + } + + // second last numeral + if (i + 2 == romanNum.length()) { + if (number == nextNumber) { + return 2; + } + } + return 3; - } else if (romanNum.equals("IV")) { - return 4; - } else { - return 6; } } } From a0c54ffc8246454b35a7ad318a3c54cc979371a1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:01:35 +0300 Subject: [PATCH 085/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 4 ++++ src/RomanNumerals.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 96ffcf7..27f4197 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -207,3 +207,7 @@ CompilationAction 1475668608898 RomanNumerals.java UnitTestCaseAction 1475668610989 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668610993 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475668876741 RomanNumerals.java 1857 3 7 0 +CompilationAction 1475668878623 RomanNumerals.java +UnitTestCaseAction 1475668882185 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668882186 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475668894723 RomanNumerals.java 1874 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d35d46a..67bf086 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -83,5 +83,7 @@ public int convertToInteger(String romanNum) { return 3; } + + return 0; } } From 4282fa9d0fd922325132606579699d755271cf4c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:03:05 +0300 Subject: [PATCH 086/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 27f4197..947e9cd 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -211,3 +211,8 @@ CompilationAction 1475668878623 RomanNumerals.java UnitTestCaseAction 1475668882185 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668882186 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475668894723 RomanNumerals.java 1874 3 8 0 +UnitTestCaseAction 1475668897293 TestRomanNumerals.java OK +UnitTestSessionAction 1475668897294 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475668978864 TestRomanNumerals.java ADD void test_IV_4()/2 METHOD +RefactoringAction 1475668981382 TestRomanNumerals.java RENAME test_IV_4()/2=>void test_V_5() METHOD +EditAction 1475668984771 TestRomanNumerals.java 5047 36 42 6 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index acc88b3..edba2d7 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -35,3 +35,5 @@ 1475666962665 production 1 198 false 1475666998977 regression 1 2 true 1475667079948 refactoring 2A 3 true +1475668897294 production 1 1639 false +1475668897295 production 3 1639 false diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index fbf992d..0373a16 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -27,3 +27,4 @@ 1475666962665 production 1 198 true 1475666998977 regression 1 2 false 1475667079948 refactoring 2A 3 true +1475668897294 production 1 1639 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 000a891..6e758c8 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -27,3 +27,4 @@ 1475666962665 production 1 268 true 1475666998977 regression 1 36 true 1475667079948 refactoring 2A 80 true +1475668897294 production 1 1817 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index badda7c..d794d83 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -30,6 +30,12 @@ public void test_IV_4() { assertEquals(4, number); } + @Test + public void test_V_5() { + int number = rn.convertToInteger("V"); + assertEquals(5, number); + } + @Test public void test_VI_6() { int number = rn.convertToInteger("VI"); From c6523e6d67f5a96b9c5f884cb4d3abc4abf3d536 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:03:34 +0300 Subject: [PATCH 087/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 947e9cd..04100fe 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -216,3 +216,8 @@ UnitTestSessionAction 1475668897294 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475668978864 TestRomanNumerals.java ADD void test_IV_4()/2 METHOD RefactoringAction 1475668981382 TestRomanNumerals.java RENAME test_IV_4()/2=>void test_V_5() METHOD EditAction 1475668984771 TestRomanNumerals.java 5047 36 42 6 +UnitTestCaseAction 1475668999952 TestRomanNumerals.java OK +UnitTestSessionAction 1475668999953 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475669006929 TestRomanNumerals.java ADD void test_VI_6()/2 METHOD +RefactoringAction 1475669010449 TestRomanNumerals.java RENAME test_VI_6()/2=>void test_VII_7() METHOD +EditAction 1475669014134 TestRomanNumerals.java 5163 37 44 7 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index edba2d7..d23156f 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -37,3 +37,5 @@ 1475667079948 refactoring 2A 3 true 1475668897294 production 1 1639 false 1475668897295 production 3 1639 false +1475668999953 test-addition 1 21 true +1475668999954 test-addition 1 21 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 0373a16..2d7dd81 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -28,3 +28,4 @@ 1475666998977 regression 1 2 false 1475667079948 refactoring 2A 3 true 1475668897294 production 1 1639 false +1475668999953 test-addition 1 21 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 6e758c8..ffd8eb7 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -28,3 +28,4 @@ 1475666998977 regression 1 36 true 1475667079948 refactoring 2A 80 true 1475668897294 production 1 1817 true +1475668999953 test-addition 1 102 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d794d83..6fafb57 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -42,6 +42,12 @@ public void test_VI_6() { assertEquals(6, number); } + @Test + public void test_VII_7() { + int number = rn.convertToInteger("VII"); + assertEquals(7, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 15a24e04a33e79be92bf84dbd05cf76b5a5824ea Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:09:34 +0300 Subject: [PATCH 088/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ src/RomanNumerals.java | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 04100fe..daa3caa 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -221,3 +221,8 @@ UnitTestSessionAction 1475668999953 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475669006929 TestRomanNumerals.java ADD void test_VI_6()/2 METHOD RefactoringAction 1475669010449 TestRomanNumerals.java RENAME test_VI_6()/2=>void test_VII_7() METHOD EditAction 1475669014134 TestRomanNumerals.java 5163 37 44 7 +UnitTestCaseAction 1475669016537 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669016538 Rerun TestRomanNumerals (Failed Tests first) FAIL +UnitTestCaseAction 1475669359347 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669359348 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669374153 RomanNumerals.java 1934 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 67bf086..6700e4c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -55,23 +55,31 @@ public int convertToInteger(String romanNum) { throw new IllegalArgumentException(); } + int sum = 0; for (int i = 0; i < romanNum.length(); i++) { String numeral = String.valueOf(romanNum.charAt(i)); int number = Numeral.valueOf(numeral).value(); // last numeral if (i + 1 == romanNum.length()) { - return number; + sum += number; + break; } String nextNumeral = String.valueOf(romanNum.charAt(i + 1)); int nextNumber = Numeral.valueOf(nextNumeral).value(); - // subtract or add + // subtract, e.g. IV if (number < nextNumber) { - return nextNumber - number; - } else if (number > nextNumber) { - return number + nextNumber; + sum -= number; + i++; + continue; + } + + if (number > nextNumber) { + sum += number; + i++; + continue; } // second last numeral @@ -84,6 +92,6 @@ public int convertToInteger(String romanNum) { return 3; } - return 0; + return sum; } } From 87d4746e406e4b1e877f70cd192e6c006d6752a5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:10:52 +0300 Subject: [PATCH 089/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index daa3caa..4d265ba 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -226,3 +226,6 @@ UnitTestSessionAction 1475669016538 Rerun TestRomanNumerals (Failed Tests first) UnitTestCaseAction 1475669359347 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669359348 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669374153 RomanNumerals.java 1934 3 9 0 +UnitTestCaseAction 1475669376698 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669376700 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669452155 RomanNumerals.java 1914 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 6700e4c..8f30ccc 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -72,13 +72,11 @@ public int convertToInteger(String romanNum) { // subtract, e.g. IV if (number < nextNumber) { sum -= number; - i++; continue; } if (number > nextNumber) { sum += number; - i++; continue; } From 80c3f02b408eb80015c1841103909524ff1adae5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:12:05 +0300 Subject: [PATCH 090/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 4d265ba..68efef7 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -229,3 +229,6 @@ EditAction 1475669374153 RomanNumerals.java 1934 3 9 0 UnitTestCaseAction 1475669376698 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669376700 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669452155 RomanNumerals.java 1914 3 9 0 +UnitTestCaseAction 1475669454819 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669454820 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669524936 RomanNumerals.java 1900 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8f30ccc..ced9b90 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -83,11 +83,9 @@ public int convertToInteger(String romanNum) { // second last numeral if (i + 2 == romanNum.length()) { if (number == nextNumber) { - return 2; + sum += number; } } - - return 3; } return sum; From 9491ba92240ef8b809f71e07cee3bdf5dd4792c6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:12:22 +0300 Subject: [PATCH 091/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 68efef7..710ec1a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -232,3 +232,6 @@ EditAction 1475669452155 RomanNumerals.java 1914 3 9 0 UnitTestCaseAction 1475669454819 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669454820 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669524936 RomanNumerals.java 1900 3 9 0 +UnitTestCaseAction 1475669527681 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669527682 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669541756 RomanNumerals.java 1913 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ced9b90..51b29e3 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -83,7 +83,7 @@ public int convertToInteger(String romanNum) { // second last numeral if (i + 2 == romanNum.length()) { if (number == nextNumber) { - sum += number; + sum += number + nextNumber; } } } From 82ba4cda05c104b87eb91212c7b67cbe070d6453 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:12:27 +0300 Subject: [PATCH 092/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 710ec1a..948df65 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -235,3 +235,4 @@ EditAction 1475669524936 RomanNumerals.java 1900 3 9 0 UnitTestCaseAction 1475669527681 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669527682 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669541756 RomanNumerals.java 1913 3 9 0 +EditAction 1475669547295 RomanNumerals.java 1904 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 51b29e3..d74b3b9 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -83,7 +83,7 @@ public int convertToInteger(String romanNum) { // second last numeral if (i + 2 == romanNum.length()) { if (number == nextNumber) { - sum += number + nextNumber; + sum += number * 2; } } } From f8c2d5d1f39f7fea1566fe3e65e846d10ca54e0a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:12:34 +0300 Subject: [PATCH 093/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 948df65..fe50845 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -236,3 +236,6 @@ UnitTestCaseAction 1475669527681 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669527682 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669541756 RomanNumerals.java 1913 3 9 0 EditAction 1475669547295 RomanNumerals.java 1904 3 9 0 +UnitTestCaseAction 1475669549743 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669549745 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669553841 RomanNumerals.java 1913 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d74b3b9..51b29e3 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -83,7 +83,7 @@ public int convertToInteger(String romanNum) { // second last numeral if (i + 2 == romanNum.length()) { if (number == nextNumber) { - sum += number * 2; + sum += number + nextNumber; } } } From c8d1c3db3a863734bd71fec9aa9fcab5073b2f45 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:13:07 +0300 Subject: [PATCH 094/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 1 + 2 files changed, 4 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index fe50845..050ca46 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -239,3 +239,6 @@ EditAction 1475669547295 RomanNumerals.java 1904 3 9 0 UnitTestCaseAction 1475669549743 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669549745 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669553841 RomanNumerals.java 1913 3 9 0 +UnitTestCaseAction 1475669556397 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669556398 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669586878 RomanNumerals.java 1926 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 51b29e3..9d5da03 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -84,6 +84,7 @@ public int convertToInteger(String romanNum) { if (i + 2 == romanNum.length()) { if (number == nextNumber) { sum += number + nextNumber; + break; } } } From 5ed74d224be6d018bbc87b089f887c0692d3bf78 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:14:24 +0300 Subject: [PATCH 095/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 050ca46..c14404a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -242,3 +242,6 @@ EditAction 1475669553841 RomanNumerals.java 1913 3 9 0 UnitTestCaseAction 1475669556397 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669556398 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669586878 RomanNumerals.java 1926 3 9 0 +UnitTestCaseAction 1475669589378 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669589379 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475669663649 RomanNumerals.java 2212 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 9d5da03..456a9ca 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -87,6 +87,16 @@ public int convertToInteger(String romanNum) { break; } } + + String thirdNumeral = String.valueOf(romanNum.charAt(i + 1)); + int thirdNumber = Numeral.valueOf(thirdNumeral).value(); + + if (number == nextNumber && nextNumber == thirdNumber) { + sum += number + nextNumber + thirdNumber; + i++; + i++; + continue; + } } return sum; From 3226338d82961c91d4641946c91a4b4445121b21 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:17:29 +0300 Subject: [PATCH 096/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 8 ++ .../20161005140534595/besouroEpisodes.txt | 80 +++++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 16 ++-- 5 files changed, 98 insertions(+), 8 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index c14404a..901bda7 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -245,3 +245,11 @@ EditAction 1475669586878 RomanNumerals.java 1926 3 9 0 UnitTestCaseAction 1475669589378 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669589379 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475669663649 RomanNumerals.java 2212 3 9 0 +UnitTestCaseAction 1475669666511 TestRomanNumerals.java OK +UnitTestSessionAction 1475669666512 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475669708149 RomanNumerals.java MOVE convertToInteger(String)=>enum Numeral METHOD +RefactoringAction 1475669710167 RomanNumerals.java RENAME get()=>int get(char) METHOD +RefactoringAction 1475669711686 RomanNumerals.java MOVE convertToInteger(String)=>class RomanNumerals METHOD +RefactoringAction 1475669753738 RomanNumerals.java REMOVE value() METHOD +RefactoringAction 1475669803834 RomanNumerals.java RENAME get(char)=>static int getValue(char) METHOD +EditAction 1475669848644 RomanNumerals.java 2195 3 9 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index d23156f..5eb8a78 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -39,3 +39,83 @@ 1475668897295 production 3 1639 false 1475668999953 test-addition 1 21 true 1475668999954 test-addition 1 21 true +1475669666512 test-first 3 659 true +1475669666513 test-first 3 659 true +1475669666514 test-first 3 659 true +1475669666515 test-first 3 659 true +1475669666516 test-first 3 659 true +1475669666517 test-first 3 659 true +1475669666518 test-first 3 659 true +1475669666519 test-first 3 659 true +1475669666520 test-first 3 659 true +1475669666521 test-first 3 659 true +1475669666522 test-first 3 659 true +1475669666523 test-first 3 659 true +1475669666524 test-first 3 659 true +1475669666525 test-first 3 659 true +1475669666526 test-first 3 659 true +1475669666527 test-first 3 659 true +1475669666528 test-first 3 659 true +1475669666529 test-first 3 659 true +1475669666530 test-first 3 659 true +1475669666531 test-first 3 659 true +1475669666532 test-first 3 659 true +1475669666533 test-first 3 659 true +1475669666534 test-first 3 659 true +1475669666535 test-first 3 659 true +1475669666536 test-first 3 659 true +1475669666537 test-first 3 659 true +1475669666538 test-first 3 659 true +1475669666539 test-first 3 659 true +1475669666540 test-first 3 659 true +1475669666541 test-first 3 659 true +1475669666542 test-first 3 659 true +1475669666543 test-first 3 659 true +1475669666544 test-first 3 659 true +1475669666545 test-first 3 659 true +1475669666546 test-first 3 659 true +1475669666547 test-first 3 659 true +1475669666548 test-first 3 659 true +1475669666549 test-first 3 659 true +1475669666550 test-first 3 659 true +1475669666551 test-first 3 659 true +1475669666552 test-first 3 659 true +1475669666553 test-first 3 659 true +1475669666554 test-first 3 659 true +1475669666555 test-first 3 659 true +1475669666556 test-first 3 659 true +1475669666557 test-first 3 659 true +1475669666558 test-first 3 659 true +1475669666559 test-first 3 659 true +1475669666560 test-first 3 659 true +1475669666561 test-first 3 659 true +1475669666562 test-first 3 659 true +1475669666563 test-first 3 659 true +1475669666564 test-first 3 659 true +1475669666565 test-first 3 659 true +1475669666566 test-first 3 659 true +1475669666567 test-first 3 659 true +1475669666568 test-first 3 659 true +1475669666569 test-first 3 659 true +1475669666570 test-first 3 659 true +1475669666571 test-first 3 659 true +1475669666572 test-first 3 659 true +1475669666573 test-first 3 659 true +1475669666574 test-first 3 659 true +1475669666575 test-first 3 659 true +1475669666576 test-first 3 659 true +1475669666577 test-first 3 659 true +1475669666578 test-first 3 659 true +1475669666579 test-first 3 659 true +1475669666580 test-first 3 659 true +1475669666581 test-first 3 659 true +1475669666582 test-first 3 659 true +1475669666583 test-first 3 659 true +1475669666584 test-first 3 659 true +1475669666585 test-first 3 659 true +1475669666586 test-first 3 659 true +1475669666587 test-first 3 659 true +1475669666588 test-first 3 659 true +1475669666589 test-first 3 659 true +1475669666590 test-first 3 659 true +1475669666591 test-first 3 659 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 2d7dd81..d53647a 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -29,3 +29,4 @@ 1475667079948 refactoring 2A 3 true 1475668897294 production 1 1639 false 1475668999953 test-addition 1 21 true +1475669666512 test-first 3 659 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index ffd8eb7..c755df1 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -29,3 +29,4 @@ 1475667079948 refactoring 2A 80 true 1475668897294 production 1 1817 true 1475668999953 test-addition 1 102 true +1475669666512 test-first 3 666 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 456a9ca..457cffb 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -19,8 +19,8 @@ private Numeral(int number) { this.number = number; } - public int value() { - return this.number; + public static int getValue(char numeral) { + return Numeral.valueOf(String.valueOf(numeral)).number; } } @@ -57,8 +57,8 @@ public int convertToInteger(String romanNum) { int sum = 0; for (int i = 0; i < romanNum.length(); i++) { - String numeral = String.valueOf(romanNum.charAt(i)); - int number = Numeral.valueOf(numeral).value(); + char numeral = romanNum.charAt(i); + int number = Numeral.getValue(numeral); // last numeral if (i + 1 == romanNum.length()) { @@ -66,8 +66,8 @@ public int convertToInteger(String romanNum) { break; } - String nextNumeral = String.valueOf(romanNum.charAt(i + 1)); - int nextNumber = Numeral.valueOf(nextNumeral).value(); + char nextNumeral = romanNum.charAt(i + 1); + int nextNumber = Numeral.getValue(nextNumeral); // subtract, e.g. IV if (number < nextNumber) { @@ -88,8 +88,8 @@ public int convertToInteger(String romanNum) { } } - String thirdNumeral = String.valueOf(romanNum.charAt(i + 1)); - int thirdNumber = Numeral.valueOf(thirdNumeral).value(); + char thirdNumeral = romanNum.charAt(i + 1); + int thirdNumber = Numeral.getValue(thirdNumeral); if (number == nextNumber && nextNumber == thirdNumber) { sum += number + nextNumber + thirdNumber; From fda245c86fe764767360f6a5cb8023ad0233ccbf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:19:37 +0300 Subject: [PATCH 097/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 4 ++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 3 +++ 5 files changed, 10 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 901bda7..6265c85 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -253,3 +253,7 @@ RefactoringAction 1475669711686 RomanNumerals.java MOVE convertToInteger(String) RefactoringAction 1475669753738 RomanNumerals.java REMOVE value() METHOD RefactoringAction 1475669803834 RomanNumerals.java RENAME get(char)=>static int getValue(char) METHOD EditAction 1475669848644 RomanNumerals.java 2195 3 9 0 +UnitTestCaseAction 1475669851341 TestRomanNumerals.java OK +UnitTestSessionAction 1475669851343 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475669943073 RomanNumerals.java ADD Map numerals FIELD +EditAction 1475669976347 RomanNumerals.java 2309 3 9 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 5eb8a78..cd1a999 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -119,3 +119,4 @@ 1475669666589 test-first 3 659 true 1475669666590 test-first 3 659 true 1475669666591 test-first 3 659 true +1475669851343 refactoring 2A 143 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index d53647a..6374879 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -30,3 +30,4 @@ 1475668897294 production 1 1639 false 1475668999953 test-addition 1 21 true 1475669666512 test-first 3 659 true +1475669851343 refactoring 2A 143 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index c755df1..3be88b0 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -30,3 +30,4 @@ 1475668897294 production 1 1817 true 1475668999953 test-addition 1 102 true 1475669666512 test-first 3 666 true +1475669851343 refactoring 2A 184 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 457cffb..a343386 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -24,6 +24,9 @@ public static int getValue(char numeral) { } } + private Map numerals = new HashMap(); + numerals.put("I", new Integer(1)); + public int convertToInteger(String romanNum) { String patternString = String.join("|", // repeat limit From c72c0ce6658a4414b1d2b85fca69d98689b580d6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:20:12 +0300 Subject: [PATCH 098/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 14 ++++++++++++++ src/RomanNumerals.java | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 6265c85..d32f4a3 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -257,3 +257,17 @@ UnitTestCaseAction 1475669851341 TestRomanNumerals.java OK UnitTestSessionAction 1475669851343 Rerun TestRomanNumerals (Failed Tests first) OK RefactoringAction 1475669943073 RomanNumerals.java ADD Map numerals FIELD EditAction 1475669976347 RomanNumerals.java 2309 3 9 0 +CompilationAction 1475669978400 RomanNumerals.java +CompilationAction 1475669978401 RomanNumerals.java +CompilationAction 1475669978402 RomanNumerals.java +CompilationAction 1475669978403 RomanNumerals.java +CompilationAction 1475669978404 RomanNumerals.java +CompilationAction 1475669990450 RomanNumerals.java +CompilationAction 1475669990451 RomanNumerals.java +CompilationAction 1475669990453 RomanNumerals.java +CompilationAction 1475669990506 RomanNumerals.java +CompilationAction 1475669990507 RomanNumerals.java +CompilationAction 1475669990507 RomanNumerals.java +CompilationAction 1475669990508 RomanNumerals.java +CompilationAction 1475669990509 RomanNumerals.java +EditAction 1475670011231 RomanNumerals.java 2313 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a343386..a38eb38 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -25,7 +25,7 @@ public static int getValue(char numeral) { } private Map numerals = new HashMap(); - numerals.put("I", new Integer(1)); + numerals.put("I", Integer.valueOf(1)); public int convertToInteger(String romanNum) { String patternString = String.join("|", From 25c962d1d07505d33ca1fde38560111777bd2bd6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:21:24 +0300 Subject: [PATCH 099/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 16 ++++++++++++++++ src/RomanNumerals.java | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index d32f4a3..0468853 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -271,3 +271,19 @@ CompilationAction 1475669990507 RomanNumerals.java CompilationAction 1475669990508 RomanNumerals.java CompilationAction 1475669990509 RomanNumerals.java EditAction 1475670011231 RomanNumerals.java 2313 3 9 0 +CompilationAction 1475670013327 RomanNumerals.java +CompilationAction 1475670013328 RomanNumerals.java +CompilationAction 1475670013329 RomanNumerals.java +CompilationAction 1475670013330 RomanNumerals.java +CompilationAction 1475670013331 RomanNumerals.java +CompilationAction 1475670068433 RomanNumerals.java +CompilationAction 1475670068435 RomanNumerals.java +CompilationAction 1475670068437 RomanNumerals.java +CompilationAction 1475670068438 RomanNumerals.java +CompilationAction 1475670068440 RomanNumerals.java +CompilationAction 1475670068652 RomanNumerals.java +CompilationAction 1475670068653 RomanNumerals.java +CompilationAction 1475670068654 RomanNumerals.java +CompilationAction 1475670068655 RomanNumerals.java +CompilationAction 1475670068656 RomanNumerals.java +EditAction 1475670084087 RomanNumerals.java 2302 3 9 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a38eb38..76c5ddf 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -24,8 +24,8 @@ public static int getValue(char numeral) { } } - private Map numerals = new HashMap(); - numerals.put("I", Integer.valueOf(1)); + private Map numerals = new HashMap(); + numerals.put('I', 1); public int convertToInteger(String romanNum) { String patternString = String.join("|", From 58d7f75f54ffcb4688c55b385782b1bf13a8af75 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:26:17 +0300 Subject: [PATCH 100/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 13 +++++++ .../20161005140534595/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 39 ++++++------------- 5 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 0468853..cc5a869 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -287,3 +287,16 @@ CompilationAction 1475670068654 RomanNumerals.java CompilationAction 1475670068655 RomanNumerals.java CompilationAction 1475670068656 RomanNumerals.java EditAction 1475670084087 RomanNumerals.java 2302 3 9 0 +CompilationAction 1475670085719 RomanNumerals.java +CompilationAction 1475670085720 RomanNumerals.java +CompilationAction 1475670085721 RomanNumerals.java +CompilationAction 1475670085721 RomanNumerals.java +CompilationAction 1475670085722 RomanNumerals.java +CompilationAction 1475670332631 RomanNumerals.java +CompilationAction 1475670332632 RomanNumerals.java +CompilationAction 1475670332634 RomanNumerals.java +CompilationAction 1475670332636 RomanNumerals.java +CompilationAction 1475670332638 RomanNumerals.java +UnitTestCaseAction 1475670334138 TestRomanNumerals.java OK +UnitTestSessionAction 1475670334139 Rerun TestRomanNumerals (Failed Tests first) OK +EditAction 1475670376880 RomanNumerals.java 2042 1 7 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index cd1a999..06fae71 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -120,3 +120,4 @@ 1475669666590 test-first 3 659 true 1475669666591 test-first 3 659 true 1475669851343 refactoring 2A 143 true +1475670334139 refactoring 2A 391 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 6374879..930e49d 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -31,3 +31,4 @@ 1475668999953 test-addition 1 21 true 1475669666512 test-first 3 659 true 1475669851343 refactoring 2A 143 true +1475670334139 refactoring 2A 391 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 3be88b0..141e5db 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -31,3 +31,4 @@ 1475668999953 test-addition 1 102 true 1475669666512 test-first 3 666 true 1475669851343 refactoring 2A 184 true +1475670334139 refactoring 2A 482 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 76c5ddf..013b461 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,28 +4,16 @@ import java.util.regex.Pattern; public class RomanNumerals { - private enum Numeral { - I(1), - V(5), - X(10), - L(50), - C(100), - D(500), - M(1000); - - private int number; - - private Numeral(int number) { - this.number = number; - } - - public static int getValue(char numeral) { - return Numeral.valueOf(String.valueOf(numeral)).number; - } - } - private Map numerals = new HashMap(); - numerals.put('I', 1); + { + numerals.put('I', 1); + numerals.put('V', 5); + numerals.put('X', 10); + numerals.put('L', 50); + numerals.put('C', 100); + numerals.put('D', 500); + numerals.put('M', 1000); + } public int convertToInteger(String romanNum) { String patternString = String.join("|", @@ -60,8 +48,7 @@ public int convertToInteger(String romanNum) { int sum = 0; for (int i = 0; i < romanNum.length(); i++) { - char numeral = romanNum.charAt(i); - int number = Numeral.getValue(numeral); + int number = numerals.get(romanNum.charAt(i)); // last numeral if (i + 1 == romanNum.length()) { @@ -69,8 +56,7 @@ public int convertToInteger(String romanNum) { break; } - char nextNumeral = romanNum.charAt(i + 1); - int nextNumber = Numeral.getValue(nextNumeral); + int nextNumber = numerals.get(romanNum.charAt(i + 1)); // subtract, e.g. IV if (number < nextNumber) { @@ -91,8 +77,7 @@ public int convertToInteger(String romanNum) { } } - char thirdNumeral = romanNum.charAt(i + 1); - int thirdNumber = Numeral.getValue(thirdNumeral); + int thirdNumber = numerals.get(romanNum.charAt(i + 2)); if (number == nextNumber && nextNumber == thirdNumber) { sum += number + nextNumber + thirdNumber; From e48374e4f5d25c39275e13da7ede85063f7acea4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:26:35 +0300 Subject: [PATCH 101/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 8 +++----- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index cc5a869..50aecc3 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -300,3 +300,6 @@ CompilationAction 1475670332638 RomanNumerals.java UnitTestCaseAction 1475670334138 TestRomanNumerals.java OK UnitTestSessionAction 1475670334139 Rerun TestRomanNumerals (Failed Tests first) OK EditAction 1475670376880 RomanNumerals.java 2042 1 7 0 +UnitTestCaseAction 1475670379439 TestRomanNumerals.java OK +UnitTestSessionAction 1475670379440 Rerun TestRomanNumerals (Failed Tests first) OK +EditAction 1475670394438 RomanNumerals.java 2024 1 7 0 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 06fae71..b9f9f7c 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -121,3 +121,4 @@ 1475669666591 test-first 3 659 true 1475669851343 refactoring 2A 143 true 1475670334139 refactoring 2A 391 true +1475670379440 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 930e49d..b3a7c25 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -32,3 +32,4 @@ 1475669666512 test-first 3 659 true 1475669851343 refactoring 2A 143 true 1475670334139 refactoring 2A 391 true +1475670379440 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 141e5db..85150d7 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -32,3 +32,4 @@ 1475669666512 test-first 3 666 true 1475669851343 refactoring 2A 184 true 1475670334139 refactoring 2A 482 true +1475670379440 refactoring 2A 45 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 013b461..7c15f88 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -70,11 +70,9 @@ public int convertToInteger(String romanNum) { } // second last numeral - if (i + 2 == romanNum.length()) { - if (number == nextNumber) { - sum += number + nextNumber; - break; - } + if (i + 2 == romanNum.length() && number == nextNumber) { + sum += number + nextNumber; + break; } int thirdNumber = numerals.get(romanNum.charAt(i + 2)); From 7a63de40925555d170acf681dfa9696573e7dd66 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:26:53 +0300 Subject: [PATCH 102/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 1 + .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 50aecc3..514401f 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -303,3 +303,9 @@ EditAction 1475670376880 RomanNumerals.java 2042 1 7 0 UnitTestCaseAction 1475670379439 TestRomanNumerals.java OK UnitTestSessionAction 1475670379440 Rerun TestRomanNumerals (Failed Tests first) OK EditAction 1475670394438 RomanNumerals.java 2024 1 7 0 +UnitTestCaseAction 1475670397126 TestRomanNumerals.java OK +UnitTestSessionAction 1475670397127 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670406619 TestRomanNumerals.java ADD void test_VII_7()/2 METHOD +RefactoringAction 1475670408640 TestRomanNumerals.java RENAME test_VII_7()/2=>void test_VIII_() METHOD +RefactoringAction 1475670409657 TestRomanNumerals.java RENAME test_VIII_()=>void test_VIII_8() METHOD +EditAction 1475670412897 TestRomanNumerals.java 5281 38 46 8 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index b9f9f7c..308eb5a 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -122,3 +122,4 @@ 1475669851343 refactoring 2A 143 true 1475670334139 refactoring 2A 391 true 1475670379440 refactoring 2A 2 true +1475670397127 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index b3a7c25..6c8a9d7 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -33,3 +33,4 @@ 1475669851343 refactoring 2A 143 true 1475670334139 refactoring 2A 391 true 1475670379440 refactoring 2A 2 true +1475670397127 refactoring 2A 2 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 85150d7..c7bc997 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -33,3 +33,4 @@ 1475669851343 refactoring 2A 184 true 1475670334139 refactoring 2A 482 true 1475670379440 refactoring 2A 45 true +1475670397127 refactoring 2A 17 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 6fafb57..824b0b5 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -48,6 +48,12 @@ public void test_VII_7() { assertEquals(7, number); } + @Test + public void test_VIII_8() { + int number = rn.convertToInteger("VIII"); + assertEquals(8, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 6074b9d873689577ff5ed62a96e240091c630195 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:27:08 +0300 Subject: [PATCH 103/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 16 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 514401f..42bc530 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -309,3 +309,9 @@ RefactoringAction 1475670406619 TestRomanNumerals.java ADD void test_VII_7()/2 M RefactoringAction 1475670408640 TestRomanNumerals.java RENAME test_VII_7()/2=>void test_VIII_() METHOD RefactoringAction 1475670409657 TestRomanNumerals.java RENAME test_VIII_()=>void test_VIII_8() METHOD EditAction 1475670412897 TestRomanNumerals.java 5281 38 46 8 +UnitTestCaseAction 1475670415333 TestRomanNumerals.java OK +UnitTestSessionAction 1475670415334 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670419194 TestRomanNumerals.java ADD void test_VIII_8()/2 METHOD +RefactoringAction 1475670422209 TestRomanNumerals.java RENAME test_VIII_8()/2=>void test_I_8() METHOD +RefactoringAction 1475670424226 TestRomanNumerals.java RENAME test_I_8()=>void test_IX_9() METHOD +EditAction 1475670427654 TestRomanNumerals.java 5395 39 48 9 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 308eb5a..890d435 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -123,3 +123,5 @@ 1475670334139 refactoring 2A 391 true 1475670379440 refactoring 2A 2 true 1475670397127 refactoring 2A 2 true +1475670415334 test-addition 1 8 true +1475670415335 test-addition 1 8 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 6c8a9d7..4a39615 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -34,3 +34,4 @@ 1475670334139 refactoring 2A 391 true 1475670379440 refactoring 2A 2 true 1475670397127 refactoring 2A 2 true +1475670415334 test-addition 1 8 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index c7bc997..f7790ed 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -34,3 +34,4 @@ 1475670334139 refactoring 2A 482 true 1475670379440 refactoring 2A 45 true 1475670397127 refactoring 2A 17 true +1475670415334 test-addition 1 18 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 824b0b5..9f503b0 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -54,6 +54,12 @@ public void test_VIII_8() { assertEquals(8, number); } + @Test + public void test_IX_9() { + int number = rn.convertToInteger("IX"); + assertEquals(9, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 28416aa0aea6c8dcf6e75a982cfaf6459671c121 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:27:32 +0300 Subject: [PATCH 104/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 16 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 42bc530..7245d66 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -315,3 +315,9 @@ RefactoringAction 1475670419194 TestRomanNumerals.java ADD void test_VIII_8()/2 RefactoringAction 1475670422209 TestRomanNumerals.java RENAME test_VIII_8()/2=>void test_I_8() METHOD RefactoringAction 1475670424226 TestRomanNumerals.java RENAME test_I_8()=>void test_IX_9() METHOD EditAction 1475670427654 TestRomanNumerals.java 5395 39 48 9 +UnitTestCaseAction 1475670429962 TestRomanNumerals.java OK +UnitTestSessionAction 1475670429963 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670434262 TestRomanNumerals.java ADD void test_IX_9()/2 METHOD +RefactoringAction 1475670445779 TestRomanNumerals.java RENAME test_IX_9()/2=>void test_X_9() METHOD +RefactoringAction 1475670447294 TestRomanNumerals.java RENAME test_X_9()=>void test_XV_15() METHOD +EditAction 1475670451602 TestRomanNumerals.java 5511 40 50 10 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 890d435..f87ebad 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -125,3 +125,5 @@ 1475670397127 refactoring 2A 2 true 1475670415334 test-addition 1 8 true 1475670415335 test-addition 1 8 true +1475670429963 test-addition 1 10 true +1475670429964 test-addition 1 10 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 4a39615..b7db44f 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -35,3 +35,4 @@ 1475670379440 refactoring 2A 2 true 1475670397127 refactoring 2A 2 true 1475670415334 test-addition 1 8 true +1475670429963 test-addition 1 10 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index f7790ed..96c5556 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -35,3 +35,4 @@ 1475670379440 refactoring 2A 45 true 1475670397127 refactoring 2A 17 true 1475670415334 test-addition 1 18 true +1475670429963 test-addition 1 14 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 9f503b0..0bc6e7f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -60,6 +60,12 @@ public void test_IX_9() { assertEquals(9, number); } + @Test + public void test_XV_15() { + int number = rn.convertToInteger("XV"); + assertEquals(15, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From ec99d48432ddafc8047081d60257a3a03a0bf254 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:27:47 +0300 Subject: [PATCH 105/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 7245d66..eb8a781 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -321,3 +321,8 @@ RefactoringAction 1475670434262 TestRomanNumerals.java ADD void test_IX_9()/2 ME RefactoringAction 1475670445779 TestRomanNumerals.java RENAME test_IX_9()/2=>void test_X_9() METHOD RefactoringAction 1475670447294 TestRomanNumerals.java RENAME test_X_9()=>void test_XV_15() METHOD EditAction 1475670451602 TestRomanNumerals.java 5511 40 50 10 +UnitTestCaseAction 1475670454183 TestRomanNumerals.java OK +UnitTestSessionAction 1475670454184 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670460831 TestRomanNumerals.java ADD void test_XV_15()/2 METHOD +RefactoringAction 1475670463848 TestRomanNumerals.java RENAME test_XV_15()/2=>void test_XVI_16() METHOD +EditAction 1475670466539 TestRomanNumerals.java 5629 41 52 11 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index f87ebad..31ce5ca 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -127,3 +127,5 @@ 1475670415335 test-addition 1 8 true 1475670429963 test-addition 1 10 true 1475670429964 test-addition 1 10 true +1475670454184 test-addition 1 19 true +1475670454185 test-addition 1 19 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index b7db44f..f3bf349 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -36,3 +36,4 @@ 1475670397127 refactoring 2A 2 true 1475670415334 test-addition 1 8 true 1475670429963 test-addition 1 10 true +1475670454184 test-addition 1 19 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 96c5556..2d3fdc6 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -36,3 +36,4 @@ 1475670397127 refactoring 2A 17 true 1475670415334 test-addition 1 18 true 1475670429963 test-addition 1 14 true +1475670454184 test-addition 1 24 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 0bc6e7f..515c725 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -66,6 +66,12 @@ public void test_XV_15() { assertEquals(15, number); } + @Test + public void test_XVI_16() { + int number = rn.convertToInteger("XVI"); + assertEquals(16, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 811e1707409fa6a0fcb1880393bc7aeff4c886fe Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:28:04 +0300 Subject: [PATCH 106/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index eb8a781..4140181 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -326,3 +326,8 @@ UnitTestSessionAction 1475670454184 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670460831 TestRomanNumerals.java ADD void test_XV_15()/2 METHOD RefactoringAction 1475670463848 TestRomanNumerals.java RENAME test_XV_15()/2=>void test_XVI_16() METHOD EditAction 1475670466539 TestRomanNumerals.java 5629 41 52 11 +UnitTestCaseAction 1475670469079 TestRomanNumerals.java OK +UnitTestSessionAction 1475670469080 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670477388 TestRomanNumerals.java ADD void test_XV_15()/2 METHOD +RefactoringAction 1475670480404 TestRomanNumerals.java RENAME test_XV_15()/2=>void test_XIV_14() METHOD +EditAction 1475670483475 TestRomanNumerals.java 5747 42 54 12 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 31ce5ca..e26fc71 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -129,3 +129,5 @@ 1475670429964 test-addition 1 10 true 1475670454184 test-addition 1 19 true 1475670454185 test-addition 1 19 true +1475670469080 test-addition 1 8 true +1475670469081 test-addition 1 8 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index f3bf349..160d505 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -37,3 +37,4 @@ 1475670415334 test-addition 1 8 true 1475670429963 test-addition 1 10 true 1475670454184 test-addition 1 19 false +1475670469080 test-addition 1 8 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 2d3fdc6..5d209c8 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -37,3 +37,4 @@ 1475670415334 test-addition 1 18 true 1475670429963 test-addition 1 14 true 1475670454184 test-addition 1 24 true +1475670469080 test-addition 1 14 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 515c725..2d90029 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -60,6 +60,12 @@ public void test_IX_9() { assertEquals(9, number); } + @Test + public void test_XIV_14() { + int number = rn.convertToInteger("XIV"); + assertEquals(14, number); + } + @Test public void test_XV_15() { int number = rn.convertToInteger("XV"); From 288bcd2a4bc15ecaf87af0862d1509abad3b359b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:28:27 +0300 Subject: [PATCH 107/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 4140181..ea1bacd 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -331,3 +331,8 @@ UnitTestSessionAction 1475670469080 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670477388 TestRomanNumerals.java ADD void test_XV_15()/2 METHOD RefactoringAction 1475670480404 TestRomanNumerals.java RENAME test_XV_15()/2=>void test_XIV_14() METHOD EditAction 1475670483475 TestRomanNumerals.java 5747 42 54 12 +UnitTestCaseAction 1475670485957 TestRomanNumerals.java OK +UnitTestSessionAction 1475670485958 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670501454 TestRomanNumerals.java ADD void test_XVI_16()/2 METHOD +RefactoringAction 1475670503970 TestRomanNumerals.java RENAME test_XVI_16()/2=>void test_XX_20() METHOD +EditAction 1475670507111 TestRomanNumerals.java 5863 43 56 13 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index e26fc71..6afdc08 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -131,3 +131,5 @@ 1475670454185 test-addition 1 19 true 1475670469080 test-addition 1 8 true 1475670469081 test-addition 1 8 true +1475670485958 test-addition 1 8 true +1475670485959 test-addition 1 8 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 160d505..47e7f2e 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -38,3 +38,4 @@ 1475670429963 test-addition 1 10 true 1475670454184 test-addition 1 19 false 1475670469080 test-addition 1 8 true +1475670485958 test-addition 1 8 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 5d209c8..6c4fbac 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -38,3 +38,4 @@ 1475670429963 test-addition 1 14 true 1475670454184 test-addition 1 24 true 1475670469080 test-addition 1 14 true +1475670485958 test-addition 1 16 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2d90029..c201e4d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -78,6 +78,12 @@ public void test_XVI_16() { assertEquals(16, number); } + @Test + public void test_XX_20() { + int number = rn.convertToInteger("XX"); + assertEquals(20, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 1f212a9dab5c23206e9693bdddb9d7a73bf8e97f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:28:42 +0300 Subject: [PATCH 108/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index ea1bacd..a41911e 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -336,3 +336,8 @@ UnitTestSessionAction 1475670485958 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670501454 TestRomanNumerals.java ADD void test_XVI_16()/2 METHOD RefactoringAction 1475670503970 TestRomanNumerals.java RENAME test_XVI_16()/2=>void test_XX_20() METHOD EditAction 1475670507111 TestRomanNumerals.java 5863 43 56 13 +UnitTestCaseAction 1475670509681 TestRomanNumerals.java OK +UnitTestSessionAction 1475670509682 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670516521 TestRomanNumerals.java ADD void test_XX_20()/2 METHOD +RefactoringAction 1475670518538 TestRomanNumerals.java RENAME test_XX_20()/2=>void test_XXX_30() METHOD +EditAction 1475670521668 TestRomanNumerals.java 5981 44 58 14 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 6afdc08..12a00db 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -133,3 +133,5 @@ 1475670469081 test-addition 1 8 true 1475670485958 test-addition 1 8 true 1475670485959 test-addition 1 8 true +1475670509682 test-addition 1 8 true +1475670509683 test-addition 1 8 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 47e7f2e..83e3eba 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -39,3 +39,4 @@ 1475670454184 test-addition 1 19 false 1475670469080 test-addition 1 8 true 1475670485958 test-addition 1 8 false +1475670509682 test-addition 1 8 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 6c4fbac..1045b68 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -39,3 +39,4 @@ 1475670454184 test-addition 1 24 true 1475670469080 test-addition 1 14 true 1475670485958 test-addition 1 16 true +1475670509682 test-addition 1 23 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c201e4d..aa48293 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -84,6 +84,12 @@ public void test_XX_20() { assertEquals(20, number); } + @Test + public void test_XXX_30() { + int number = rn.convertToInteger("XXX"); + assertEquals(30, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 6d9e4021e699bd62a888429cb7b2ebb4303403bc Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:28:55 +0300 Subject: [PATCH 109/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index a41911e..6ab00f6 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -341,3 +341,8 @@ UnitTestSessionAction 1475670509682 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670516521 TestRomanNumerals.java ADD void test_XX_20()/2 METHOD RefactoringAction 1475670518538 TestRomanNumerals.java RENAME test_XX_20()/2=>void test_XXX_30() METHOD EditAction 1475670521668 TestRomanNumerals.java 5981 44 58 14 +UnitTestCaseAction 1475670523891 TestRomanNumerals.java OK +UnitTestSessionAction 1475670523892 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670530086 TestRomanNumerals.java ADD void test_XXX_30()/2 METHOD +RefactoringAction 1475670532601 TestRomanNumerals.java RENAME test_XXX_30()/2=>void test_XL_40() METHOD +EditAction 1475670535354 TestRomanNumerals.java 6097 45 60 15 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 12a00db..839c434 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -135,3 +135,5 @@ 1475670485959 test-addition 1 8 true 1475670509682 test-addition 1 8 true 1475670509683 test-addition 1 8 true +1475670523892 test-addition 1 7 true +1475670523893 test-addition 1 7 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 83e3eba..3ff8479 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -40,3 +40,4 @@ 1475670469080 test-addition 1 8 true 1475670485958 test-addition 1 8 false 1475670509682 test-addition 1 8 true +1475670523892 test-addition 1 7 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 1045b68..e0c5e0c 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -40,3 +40,4 @@ 1475670469080 test-addition 1 14 true 1475670485958 test-addition 1 16 true 1475670509682 test-addition 1 23 true +1475670523892 test-addition 1 14 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index aa48293..b0ff9d2 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -90,6 +90,12 @@ public void test_XXX_30() { assertEquals(30, number); } + @Test + public void test_XL_40() { + int number = rn.convertToInteger("XL"); + assertEquals(40, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From 653c4ad9910b2ac3c8cf2e9a963ad72ce16bd743 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:29:25 +0300 Subject: [PATCH 110/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 6ab00f6..5e5f04b 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -346,3 +346,8 @@ UnitTestSessionAction 1475670523892 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670530086 TestRomanNumerals.java ADD void test_XXX_30()/2 METHOD RefactoringAction 1475670532601 TestRomanNumerals.java RENAME test_XXX_30()/2=>void test_XL_40() METHOD EditAction 1475670535354 TestRomanNumerals.java 6097 45 60 15 +UnitTestCaseAction 1475670537764 TestRomanNumerals.java OK +UnitTestSessionAction 1475670537765 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670552141 TestRomanNumerals.java ADD void test_XL_40()/2 METHOD +RefactoringAction 1475670556157 TestRomanNumerals.java RENAME test_XL_40()/2=>void test_DCCC_800() METHOD +EditAction 1475670564883 TestRomanNumerals.java 6219 46 62 16 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 839c434..98c7724 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -137,3 +137,5 @@ 1475670509683 test-addition 1 8 true 1475670523892 test-addition 1 7 true 1475670523893 test-addition 1 7 true +1475670537765 test-addition 1 7 true +1475670537766 test-addition 1 7 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 3ff8479..fb32208 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -41,3 +41,4 @@ 1475670485958 test-addition 1 8 false 1475670509682 test-addition 1 8 true 1475670523892 test-addition 1 7 false +1475670537765 test-addition 1 7 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index e0c5e0c..28631aa 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -41,3 +41,4 @@ 1475670485958 test-addition 1 16 true 1475670509682 test-addition 1 23 true 1475670523892 test-addition 1 14 true +1475670537765 test-addition 1 13 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index b0ff9d2..802cc5a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -96,6 +96,12 @@ public void test_XL_40() { assertEquals(40, number); } + @Test + public void test_DCCC_800() { + int number = rn.convertToInteger("DCCC"); + assertEquals(800, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From edc1a181045c2d36657d3f827e6e3aae97be43aa Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:30:02 +0300 Subject: [PATCH 111/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 5e5f04b..c8668de 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -351,3 +351,10 @@ UnitTestSessionAction 1475670537765 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670552141 TestRomanNumerals.java ADD void test_XL_40()/2 METHOD RefactoringAction 1475670556157 TestRomanNumerals.java RENAME test_XL_40()/2=>void test_DCCC_800() METHOD EditAction 1475670564883 TestRomanNumerals.java 6219 46 62 16 +UnitTestCaseAction 1475670567474 TestRomanNumerals.java OK +UnitTestSessionAction 1475670567475 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670577202 TestRomanNumerals.java ADD void test_DCCC_800()/2 METHOD +RefactoringAction 1475670587231 TestRomanNumerals.java RENAME test_DCCC_800()/2=>void test_MCMLXXX_800() METHOD +RefactoringAction 1475670590247 TestRomanNumerals.java RENAME test_MCMLXXX_800()=>void test_MCMLXXXIV_() METHOD +RefactoringAction 1475670592763 TestRomanNumerals.java RENAME test_MCMLXXXIV_()=>void test_MCMLXXXIV_1984() METHOD +EditAction 1475670601757 TestRomanNumerals.java 6353 47 64 17 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 98c7724..e64cb4e 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -139,3 +139,5 @@ 1475670523893 test-addition 1 7 true 1475670537765 test-addition 1 7 true 1475670537766 test-addition 1 7 true +1475670567475 test-addition 1 15 true +1475670567476 test-addition 1 15 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index fb32208..5b36d5f 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -42,3 +42,4 @@ 1475670509682 test-addition 1 8 true 1475670523892 test-addition 1 7 false 1475670537765 test-addition 1 7 false +1475670567475 test-addition 1 15 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 28631aa..342771b 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -42,3 +42,4 @@ 1475670509682 test-addition 1 23 true 1475670523892 test-addition 1 14 true 1475670537765 test-addition 1 13 true +1475670567475 test-addition 1 29 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 802cc5a..6b8d3a1 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -102,6 +102,12 @@ public void test_DCCC_800() { assertEquals(800, number); } + @Test + public void test_MCMLXXXIV_1984() { + int number = rn.convertToInteger("MCMLXXXIV"); + assertEquals(1984, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From d1cdccdd8707e897939d2df6dee9de2bc38a8159 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:30:25 +0300 Subject: [PATCH 112/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 6 ++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 16 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index c8668de..d0f5782 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -358,3 +358,9 @@ RefactoringAction 1475670587231 TestRomanNumerals.java RENAME test_DCCC_800()/2= RefactoringAction 1475670590247 TestRomanNumerals.java RENAME test_MCMLXXX_800()=>void test_MCMLXXXIV_() METHOD RefactoringAction 1475670592763 TestRomanNumerals.java RENAME test_MCMLXXXIV_()=>void test_MCMLXXXIV_1984() METHOD EditAction 1475670601757 TestRomanNumerals.java 6353 47 64 17 +UnitTestCaseAction 1475670604459 TestRomanNumerals.java OK +UnitTestSessionAction 1475670604460 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670611303 TestRomanNumerals.java ADD void test_MCMLXXXIV_1984()/2 METHOD +RefactoringAction 1475670616319 TestRomanNumerals.java RENAME test_MCMLXXXIV_1984()/2=>void test_MMXIV_1984() METHOD +RefactoringAction 1475670619839 TestRomanNumerals.java RENAME test_MMXIV_1984()=>void test_MMXIV_2014() METHOD +EditAction 1475670624782 TestRomanNumerals.java 6479 48 66 18 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index e64cb4e..cb592b1 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -141,3 +141,5 @@ 1475670537766 test-addition 1 7 true 1475670567475 test-addition 1 15 true 1475670567476 test-addition 1 15 true +1475670604460 test-addition 1 27 true +1475670604461 test-addition 1 27 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 5b36d5f..3342c9c 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -43,3 +43,4 @@ 1475670523892 test-addition 1 7 false 1475670537765 test-addition 1 7 false 1475670567475 test-addition 1 15 true +1475670604460 test-addition 1 27 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 342771b..7af33d9 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -43,3 +43,4 @@ 1475670523892 test-addition 1 14 true 1475670537765 test-addition 1 13 true 1475670567475 test-addition 1 29 true +1475670604460 test-addition 1 36 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 6b8d3a1..49a820a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -108,6 +108,12 @@ public void test_MCMLXXXIV_1984() { assertEquals(1984, number); } + @Test + public void test_MMXIV_2014() { + int number = rn.convertToInteger("MMXIV"); + assertEquals(2014, number); + } + @Test (expected = IllegalArgumentException.class) public void test_I_cannot_repeat_four_times() { rn.convertToInteger("IIII"); From e74e47ae67464b303d674ec787601e36db9213ca Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:31:36 +0300 Subject: [PATCH 113/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 3 +++ src/RomanNumerals.java | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index d0f5782..2dfbdcf 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -364,3 +364,6 @@ RefactoringAction 1475670611303 TestRomanNumerals.java ADD void test_MCMLXXXIV_1 RefactoringAction 1475670616319 TestRomanNumerals.java RENAME test_MCMLXXXIV_1984()/2=>void test_MMXIV_1984() METHOD RefactoringAction 1475670619839 TestRomanNumerals.java RENAME test_MMXIV_1984()=>void test_MMXIV_2014() METHOD EditAction 1475670624782 TestRomanNumerals.java 6479 48 66 18 +UnitTestCaseAction 1475670627072 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670627073 Rerun TestRomanNumerals (Failed Tests first) FAIL +EditAction 1475670695783 RomanNumerals.java 2154 1 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 7c15f88..683619a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -77,6 +77,12 @@ public int convertToInteger(String romanNum) { int thirdNumber = numerals.get(romanNum.charAt(i + 2)); + if (number == nextNumber && nextNumber != thirdNumber) { + sum += number + nextNumber; + i++; + continue; + } + if (number == nextNumber && nextNumber == thirdNumber) { sum += number + nextNumber + thirdNumber; i++; From 6ffc890fa55477c2988eec766b56f1016837e853 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:32:14 +0300 Subject: [PATCH 114/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 2dfbdcf..df05bee 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -367,3 +367,10 @@ EditAction 1475670624782 TestRomanNumerals.java 6479 48 66 18 UnitTestCaseAction 1475670627072 TestRomanNumerals.java FAIL UnitTestSessionAction 1475670627073 Rerun TestRomanNumerals (Failed Tests first) FAIL EditAction 1475670695783 RomanNumerals.java 2154 1 7 0 +UnitTestCaseAction 1475670698412 TestRomanNumerals.java OK +UnitTestSessionAction 1475670698413 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670718877 TestRomanNumerals.java ADD void test_XL_40()/2 METHOD +RefactoringAction 1475670720894 TestRomanNumerals.java RENAME test_XL_40()/2=>void test_L_40() METHOD +RefactoringAction 1475670721913 TestRomanNumerals.java RENAME test_L_40()=>void test_LXXX_40() METHOD +RefactoringAction 1475670729422 TestRomanNumerals.java RENAME test_LXXX_40()=>void test_LXXXI_81() METHOD +EditAction 1475670733425 TestRomanNumerals.java 6601 49 68 19 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index cb592b1..551ac4c 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -143,3 +143,5 @@ 1475670567476 test-addition 1 15 true 1475670604460 test-addition 1 27 true 1475670604461 test-addition 1 27 true +1475670698413 test-first 3 87 true +1475670698414 test-first 3 87 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 3342c9c..8fe735f 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -44,3 +44,4 @@ 1475670537765 test-addition 1 7 false 1475670567475 test-addition 1 15 true 1475670604460 test-addition 1 27 true +1475670698413 test-first 3 87 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 7af33d9..9514c0c 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -44,3 +44,4 @@ 1475670537765 test-addition 1 13 true 1475670567475 test-addition 1 29 true 1475670604460 test-addition 1 36 true +1475670698413 test-first 3 93 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 49a820a..3cc9eae 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -96,6 +96,12 @@ public void test_XL_40() { assertEquals(40, number); } + @Test + public void test_LXXXI_81() { + int number = rn.convertToInteger("LXXXI"); + assertEquals(81, number); + } + @Test public void test_DCCC_800() { int number = rn.convertToInteger("DCCC"); From fcfdccf88c65d3cce46459d89cb04b0fcdea1356 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:35:28 +0300 Subject: [PATCH 115/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 5 +++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index df05bee..bbdf55a 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -374,3 +374,8 @@ RefactoringAction 1475670720894 TestRomanNumerals.java RENAME test_XL_40()/2=>vo RefactoringAction 1475670721913 TestRomanNumerals.java RENAME test_L_40()=>void test_LXXX_40() METHOD RefactoringAction 1475670729422 TestRomanNumerals.java RENAME test_LXXX_40()=>void test_LXXXI_81() METHOD EditAction 1475670733425 TestRomanNumerals.java 6601 49 68 19 +UnitTestCaseAction 1475670735744 TestRomanNumerals.java OK +UnitTestSessionAction 1475670735745 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670916969 TestRomanNumerals.java ADD void test_XL_40()/2 METHOD +RefactoringAction 1475670923487 TestRomanNumerals.java RENAME test_XL_40()/2=>void test_LXIV_64() METHOD +EditAction 1475670927541 TestRomanNumerals.java 6721 50 70 20 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 551ac4c..8027593 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -145,3 +145,5 @@ 1475670604461 test-addition 1 27 true 1475670698413 test-first 3 87 true 1475670698414 test-first 3 87 true +1475670735745 test-addition 1 16 true +1475670735746 test-addition 1 16 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 8fe735f..3e6a6b5 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -45,3 +45,4 @@ 1475670567475 test-addition 1 15 true 1475670604460 test-addition 1 27 true 1475670698413 test-first 3 87 true +1475670735745 test-addition 1 16 true diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 9514c0c..933e059 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -45,3 +45,4 @@ 1475670567475 test-addition 1 29 true 1475670604460 test-addition 1 36 true 1475670698413 test-first 3 93 true +1475670735745 test-addition 1 37 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3cc9eae..0575322 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -96,6 +96,12 @@ public void test_XL_40() { assertEquals(40, number); } + @Test + public void test_LXIV_64() { + int number = rn.convertToInteger("LXIV"); + assertEquals(64, number); + } + @Test public void test_LXXXI_81() { int number = rn.convertToInteger("LXXXI"); From 5597cef0a379468c2587820024ccc277cd019a23 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:35:53 +0300 Subject: [PATCH 116/117] besouro automatic message --- .besouro/20161005140534595/actions.txt | 7 +++++++ .besouro/20161005140534595/besouroEpisodes.txt | 2 ++ .besouro/20161005140534595/randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 5 files changed, 17 insertions(+) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index bbdf55a..5e4f027 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -379,3 +379,10 @@ UnitTestSessionAction 1475670735745 Rerun TestRomanNumerals (Failed Tests first) RefactoringAction 1475670916969 TestRomanNumerals.java ADD void test_XL_40()/2 METHOD RefactoringAction 1475670923487 TestRomanNumerals.java RENAME test_XL_40()/2=>void test_LXIV_64() METHOD EditAction 1475670927541 TestRomanNumerals.java 6721 50 70 20 +UnitTestCaseAction 1475670930208 TestRomanNumerals.java OK +UnitTestSessionAction 1475670930210 Rerun TestRomanNumerals (Failed Tests first) OK +RefactoringAction 1475670938542 TestRomanNumerals.java ADD void test_LXXXI_81()/2 METHOD +RefactoringAction 1475670944061 TestRomanNumerals.java RENAME test_LXXXI_81()/2=>void test_CCXX_81() METHOD +RefactoringAction 1475670946079 TestRomanNumerals.java RENAME test_CCXX_81()=>void test_CCXXVI_81() METHOD +RefactoringAction 1475670948596 TestRomanNumerals.java RENAME test_CCXXVI_81()=>void test_CCXXVI_226() METHOD +EditAction 1475670952310 TestRomanNumerals.java 6847 51 72 21 diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index 8027593..f455829 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -147,3 +147,5 @@ 1475670698414 test-first 3 87 true 1475670735745 test-addition 1 16 true 1475670735746 test-addition 1 16 true +1475670930210 test-addition 1 13 true +1475670930211 test-addition 1 13 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index 3e6a6b5..fc40e93 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -46,3 +46,4 @@ 1475670604460 test-addition 1 27 true 1475670698413 test-first 3 87 true 1475670735745 test-addition 1 16 true +1475670930210 test-addition 1 13 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index 933e059..fc374f0 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -46,3 +46,4 @@ 1475670604460 test-addition 1 36 true 1475670698413 test-first 3 93 true 1475670735745 test-addition 1 37 true +1475670930210 test-addition 1 194 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 0575322..a8dd45b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -108,6 +108,12 @@ public void test_LXXXI_81() { assertEquals(81, number); } + @Test + public void test_CCXXVI_226() { + int number = rn.convertToInteger("CCXXVI"); + assertEquals(226, number); + } + @Test public void test_DCCC_800() { int number = rn.convertToInteger("DCCC"); From 27057de9e167f3164e2c2ecb4085b78bae3fced7 Mon Sep 17 00:00:00 2001 From: Matias Kinnunen Date: Wed, 5 Oct 2016 15:38:52 +0300 Subject: [PATCH 117/117] Assignment finished --- .besouro/20161005140534595/actions.txt | 2 + .../20161005140534595/besouroEpisodes.txt | 2 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005140534595/zorroEpisodes.txt | 1 + .classpath | 16 +- .gitattributes | 34 +- .gitignore | 96 +-- .project | 34 +- src/RomanNumerals.java | 192 +++--- tests/TestRomanNumerals.java | 570 +++++++++--------- 10 files changed, 477 insertions(+), 471 deletions(-) diff --git a/.besouro/20161005140534595/actions.txt b/.besouro/20161005140534595/actions.txt index 5e4f027..8e3fc5e 100644 --- a/.besouro/20161005140534595/actions.txt +++ b/.besouro/20161005140534595/actions.txt @@ -386,3 +386,5 @@ RefactoringAction 1475670944061 TestRomanNumerals.java RENAME test_LXXXI_81()/2= RefactoringAction 1475670946079 TestRomanNumerals.java RENAME test_CCXX_81()=>void test_CCXXVI_81() METHOD RefactoringAction 1475670948596 TestRomanNumerals.java RENAME test_CCXXVI_81()=>void test_CCXXVI_226() METHOD EditAction 1475670952310 TestRomanNumerals.java 6847 51 72 21 +UnitTestCaseAction 1475670954852 TestRomanNumerals.java OK +UnitTestSessionAction 1475670954853 Rerun TestRomanNumerals (Failed Tests first) OK diff --git a/.besouro/20161005140534595/besouroEpisodes.txt b/.besouro/20161005140534595/besouroEpisodes.txt index f455829..ccfa7fb 100644 --- a/.besouro/20161005140534595/besouroEpisodes.txt +++ b/.besouro/20161005140534595/besouroEpisodes.txt @@ -149,3 +149,5 @@ 1475670735746 test-addition 1 16 true 1475670930210 test-addition 1 13 true 1475670930211 test-addition 1 13 true +1475670954853 test-addition 1 16 true +1475670954854 test-addition 1 16 true diff --git a/.besouro/20161005140534595/randomHeuristicEpisodes.txt b/.besouro/20161005140534595/randomHeuristicEpisodes.txt index fc40e93..d345a9a 100644 --- a/.besouro/20161005140534595/randomHeuristicEpisodes.txt +++ b/.besouro/20161005140534595/randomHeuristicEpisodes.txt @@ -47,3 +47,4 @@ 1475670698413 test-first 3 87 true 1475670735745 test-addition 1 16 true 1475670930210 test-addition 1 13 false +1475670954853 test-addition 1 16 false diff --git a/.besouro/20161005140534595/zorroEpisodes.txt b/.besouro/20161005140534595/zorroEpisodes.txt index fc374f0..de2d14f 100644 --- a/.besouro/20161005140534595/zorroEpisodes.txt +++ b/.besouro/20161005140534595/zorroEpisodes.txt @@ -47,3 +47,4 @@ 1475670698413 test-first 3 93 true 1475670735745 test-addition 1 37 true 1475670930210 test-addition 1 194 true +1475670954853 test-addition 1 24 true diff --git a/.classpath b/.classpath index b49ab80..b85cb56 100644 --- a/.classpath +++ b/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/.gitattributes b/.gitattributes index 7351b55..bdb0cab 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,17 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 0046b29..daae7a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,48 +1,48 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk -/bin/ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +/bin/ diff --git a/.project b/.project index b749631..ae0e541 100644 --- a/.project +++ b/.project @@ -1,17 +1,17 @@ - - - RomanNumerals - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + RomanNumerals + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 683619a..da94ad3 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,96 +1,96 @@ -import java.util.HashMap; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class RomanNumerals { - private Map numerals = new HashMap(); - { - numerals.put('I', 1); - numerals.put('V', 5); - numerals.put('X', 10); - numerals.put('L', 50); - numerals.put('C', 100); - numerals.put('D', 500); - numerals.put('M', 1000); - } - - public int convertToInteger(String romanNum) { - String patternString = String.join("|", - // repeat limit - "IIII", "XXXX", "CCCC", "MMMM", - - // can't repeat these symbols - "VV", "LL", "DD", - - // can't subtract from too big numbers - "IL", "IC", "ID", "IM", - "XD", "XM", - - // can't subtract more than once - "IIV", "IIX", - "XXL", "XXC", - "CCD", "CCM", - - // can't subtract the '5' symbols - "VX", "VL", "VC", "VD", "VM", - "LC", "LD", "LM", - "DM", - - // other than the allowed symbols - "[^IVXLCDM]" - ); - Pattern p = Pattern.compile(patternString); - Matcher m = p.matcher(romanNum); - if (m.find()) { - throw new IllegalArgumentException(); - } - - int sum = 0; - for (int i = 0; i < romanNum.length(); i++) { - int number = numerals.get(romanNum.charAt(i)); - - // last numeral - if (i + 1 == romanNum.length()) { - sum += number; - break; - } - - int nextNumber = numerals.get(romanNum.charAt(i + 1)); - - // subtract, e.g. IV - if (number < nextNumber) { - sum -= number; - continue; - } - - if (number > nextNumber) { - sum += number; - continue; - } - - // second last numeral - if (i + 2 == romanNum.length() && number == nextNumber) { - sum += number + nextNumber; - break; - } - - int thirdNumber = numerals.get(romanNum.charAt(i + 2)); - - if (number == nextNumber && nextNumber != thirdNumber) { - sum += number + nextNumber; - i++; - continue; - } - - if (number == nextNumber && nextNumber == thirdNumber) { - sum += number + nextNumber + thirdNumber; - i++; - i++; - continue; - } - } - - return sum; - } -} +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class RomanNumerals { + private Map numerals = new HashMap(); + { + numerals.put('I', 1); + numerals.put('V', 5); + numerals.put('X', 10); + numerals.put('L', 50); + numerals.put('C', 100); + numerals.put('D', 500); + numerals.put('M', 1000); + } + + public int convertToInteger(String romanNum) { + String patternString = String.join("|", + // repeat limit + "IIII", "XXXX", "CCCC", "MMMM", + + // can't repeat these symbols + "VV", "LL", "DD", + + // can't subtract from too big numbers + "IL", "IC", "ID", "IM", + "XD", "XM", + + // can't subtract more than once + "IIV", "IIX", + "XXL", "XXC", + "CCD", "CCM", + + // can't subtract the '5' symbols + "VX", "VL", "VC", "VD", "VM", + "LC", "LD", "LM", + "DM", + + // other than the allowed symbols + "[^IVXLCDM]" + ); + Pattern p = Pattern.compile(patternString); + Matcher m = p.matcher(romanNum); + if (m.find()) { + throw new IllegalArgumentException(); + } + + int sum = 0; + for (int i = 0; i < romanNum.length(); i++) { + int number = numerals.get(romanNum.charAt(i)); + + // last numeral + if (i + 1 == romanNum.length()) { + sum += number; + break; + } + + int nextNumber = numerals.get(romanNum.charAt(i + 1)); + + // subtract, e.g. IV + if (number < nextNumber) { + sum -= number; + continue; + } + + if (number > nextNumber) { + sum += number; + continue; + } + + // second last numeral + if (i + 2 == romanNum.length() && number == nextNumber) { + sum += number + nextNumber; + break; + } + + int thirdNumber = numerals.get(romanNum.charAt(i + 2)); + + if (number == nextNumber && nextNumber != thirdNumber) { + sum += number + nextNumber; + i++; + continue; + } + + if (number == nextNumber && nextNumber == thirdNumber) { + sum += number + nextNumber + thirdNumber; + i++; + i++; + continue; + } + } + + return sum; + } +} diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a8dd45b..bea2973 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,285 +1,285 @@ -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TestRomanNumerals { - - RomanNumerals rn = new RomanNumerals(); - - @Test - public void test_I_1() { - int number = rn.convertToInteger("I"); - assertEquals(1, number); - } - - @Test - public void test_II_2() { - int number = rn.convertToInteger("II"); - assertEquals(2, number); - } - - @Test - public void test_III_3() { - int number = rn.convertToInteger("III"); - assertEquals(3, number); - } - - @Test - public void test_IV_4() { - int number = rn.convertToInteger("IV"); - assertEquals(4, number); - } - - @Test - public void test_V_5() { - int number = rn.convertToInteger("V"); - assertEquals(5, number); - } - - @Test - public void test_VI_6() { - int number = rn.convertToInteger("VI"); - assertEquals(6, number); - } - - @Test - public void test_VII_7() { - int number = rn.convertToInteger("VII"); - assertEquals(7, number); - } - - @Test - public void test_VIII_8() { - int number = rn.convertToInteger("VIII"); - assertEquals(8, number); - } - - @Test - public void test_IX_9() { - int number = rn.convertToInteger("IX"); - assertEquals(9, number); - } - - @Test - public void test_XIV_14() { - int number = rn.convertToInteger("XIV"); - assertEquals(14, number); - } - - @Test - public void test_XV_15() { - int number = rn.convertToInteger("XV"); - assertEquals(15, number); - } - - @Test - public void test_XVI_16() { - int number = rn.convertToInteger("XVI"); - assertEquals(16, number); - } - - @Test - public void test_XX_20() { - int number = rn.convertToInteger("XX"); - assertEquals(20, number); - } - - @Test - public void test_XXX_30() { - int number = rn.convertToInteger("XXX"); - assertEquals(30, number); - } - - @Test - public void test_XL_40() { - int number = rn.convertToInteger("XL"); - assertEquals(40, number); - } - - @Test - public void test_LXIV_64() { - int number = rn.convertToInteger("LXIV"); - assertEquals(64, number); - } - - @Test - public void test_LXXXI_81() { - int number = rn.convertToInteger("LXXXI"); - assertEquals(81, number); - } - - @Test - public void test_CCXXVI_226() { - int number = rn.convertToInteger("CCXXVI"); - assertEquals(226, number); - } - - @Test - public void test_DCCC_800() { - int number = rn.convertToInteger("DCCC"); - assertEquals(800, number); - } - - @Test - public void test_MCMLXXXIV_1984() { - int number = rn.convertToInteger("MCMLXXXIV"); - assertEquals(1984, number); - } - - @Test - public void test_MMXIV_2014() { - int number = rn.convertToInteger("MMXIV"); - assertEquals(2014, number); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_repeat_four_times() { - rn.convertToInteger("IIII"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_repeat_four_times() { - rn.convertToInteger("XXXX"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_C_cannot_repeat_four_times() { - rn.convertToInteger("CCCC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_M_cannot_repeat_four_times() { - rn.convertToInteger("MMMM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_repeat() { - rn.convertToInteger("VV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_repeat() { - rn.convertToInteger("LL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_D_cannot_repeat() { - rn.convertToInteger("DD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_L() { - rn.convertToInteger("IL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_C() { - rn.convertToInteger("IC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_D() { - rn.convertToInteger("ID"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_from_M() { - rn.convertToInteger("IM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_twice_from_V() { - rn.convertToInteger("IIV"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_I_cannot_be_subtracted_twice_from_X() { - rn.convertToInteger("IIX"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_X() { - rn.convertToInteger("VX"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_L() { - rn.convertToInteger("VL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_C() { - rn.convertToInteger("VC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_D() { - rn.convertToInteger("VD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_V_cannot_be_subtracted_from_M() { - rn.convertToInteger("VM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_be_subtracted_from_D() { - rn.convertToInteger("XD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_be_subtracted_from_M() { - rn.convertToInteger("XM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_be_subtracted_twice_from_L() { - rn.convertToInteger("XXL"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_X_cannot_be_subtracted_twice_from_C() { - rn.convertToInteger("XXC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_be_subtracted_from_C() { - rn.convertToInteger("LC"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_be_subtracted_from_D() { - rn.convertToInteger("LD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_L_cannot_be_subtracted_from_M() { - rn.convertToInteger("LM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_C_cannot_be_subtracted_twice_from_D() { - rn.convertToInteger("CCD"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_C_cannot_be_subtracted_twice_from_M() { - rn.convertToInteger("CCM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_D_cannot_be_subtracted_from_M() { - rn.convertToInteger("DM"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_numbers() { - rn.convertToInteger("123"); - } - - @Test (expected = IllegalArgumentException.class) - public void test_other_letters() { - rn.convertToInteger("ABEFG"); - } - -} +import static org.junit.Assert.*; + +import org.junit.Test; + +public class TestRomanNumerals { + + RomanNumerals rn = new RomanNumerals(); + + @Test + public void test_I_1() { + int number = rn.convertToInteger("I"); + assertEquals(1, number); + } + + @Test + public void test_II_2() { + int number = rn.convertToInteger("II"); + assertEquals(2, number); + } + + @Test + public void test_III_3() { + int number = rn.convertToInteger("III"); + assertEquals(3, number); + } + + @Test + public void test_IV_4() { + int number = rn.convertToInteger("IV"); + assertEquals(4, number); + } + + @Test + public void test_V_5() { + int number = rn.convertToInteger("V"); + assertEquals(5, number); + } + + @Test + public void test_VI_6() { + int number = rn.convertToInteger("VI"); + assertEquals(6, number); + } + + @Test + public void test_VII_7() { + int number = rn.convertToInteger("VII"); + assertEquals(7, number); + } + + @Test + public void test_VIII_8() { + int number = rn.convertToInteger("VIII"); + assertEquals(8, number); + } + + @Test + public void test_IX_9() { + int number = rn.convertToInteger("IX"); + assertEquals(9, number); + } + + @Test + public void test_XIV_14() { + int number = rn.convertToInteger("XIV"); + assertEquals(14, number); + } + + @Test + public void test_XV_15() { + int number = rn.convertToInteger("XV"); + assertEquals(15, number); + } + + @Test + public void test_XVI_16() { + int number = rn.convertToInteger("XVI"); + assertEquals(16, number); + } + + @Test + public void test_XX_20() { + int number = rn.convertToInteger("XX"); + assertEquals(20, number); + } + + @Test + public void test_XXX_30() { + int number = rn.convertToInteger("XXX"); + assertEquals(30, number); + } + + @Test + public void test_XL_40() { + int number = rn.convertToInteger("XL"); + assertEquals(40, number); + } + + @Test + public void test_LXIV_64() { + int number = rn.convertToInteger("LXIV"); + assertEquals(64, number); + } + + @Test + public void test_LXXXI_81() { + int number = rn.convertToInteger("LXXXI"); + assertEquals(81, number); + } + + @Test + public void test_CCXXVI_226() { + int number = rn.convertToInteger("CCXXVI"); + assertEquals(226, number); + } + + @Test + public void test_DCCC_800() { + int number = rn.convertToInteger("DCCC"); + assertEquals(800, number); + } + + @Test + public void test_MCMLXXXIV_1984() { + int number = rn.convertToInteger("MCMLXXXIV"); + assertEquals(1984, number); + } + + @Test + public void test_MMXIV_2014() { + int number = rn.convertToInteger("MMXIV"); + assertEquals(2014, number); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_repeat_four_times() { + rn.convertToInteger("IIII"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_repeat_four_times() { + rn.convertToInteger("XXXX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_repeat_four_times() { + rn.convertToInteger("CCCC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_M_cannot_repeat_four_times() { + rn.convertToInteger("MMMM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_repeat() { + rn.convertToInteger("VV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_repeat() { + rn.convertToInteger("LL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_repeat() { + rn.convertToInteger("DD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_L() { + rn.convertToInteger("IL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_C() { + rn.convertToInteger("IC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_D() { + rn.convertToInteger("ID"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_from_M() { + rn.convertToInteger("IM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice_from_V() { + rn.convertToInteger("IIV"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_I_cannot_be_subtracted_twice_from_X() { + rn.convertToInteger("IIX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_X() { + rn.convertToInteger("VX"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_L() { + rn.convertToInteger("VL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_C() { + rn.convertToInteger("VC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_D() { + rn.convertToInteger("VD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_V_cannot_be_subtracted_from_M() { + rn.convertToInteger("VM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_from_D() { + rn.convertToInteger("XD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_from_M() { + rn.convertToInteger("XM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_twice_from_L() { + rn.convertToInteger("XXL"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_X_cannot_be_subtracted_twice_from_C() { + rn.convertToInteger("XXC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_C() { + rn.convertToInteger("LC"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_D() { + rn.convertToInteger("LD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_L_cannot_be_subtracted_from_M() { + rn.convertToInteger("LM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_be_subtracted_twice_from_D() { + rn.convertToInteger("CCD"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_C_cannot_be_subtracted_twice_from_M() { + rn.convertToInteger("CCM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_D_cannot_be_subtracted_from_M() { + rn.convertToInteger("DM"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_numbers() { + rn.convertToInteger("123"); + } + + @Test (expected = IllegalArgumentException.class) + public void test_other_letters() { + rn.convertToInteger("ABEFG"); + } + +}