From 2cd30f1d88c3ea89db2e14577dc5dce51edf9627 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:05:15 +0300 Subject: [PATCH 001/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 12 ++++++++++++ .besouro/20160928160354283/besouroEpisodes.txt | 0 .besouro/20160928160354283/disagreements.txt | 0 .../20160928160354283/randomHeuristicEpisodes.txt | 0 .besouro/20160928160354283/userComments.txt | 0 .besouro/20160928160354283/zorroEpisodes.txt | 0 tests/TestRomanNumerals.java | 10 +++++++--- 7 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .besouro/20160928160354283/actions.txt create mode 100644 .besouro/20160928160354283/besouroEpisodes.txt create mode 100644 .besouro/20160928160354283/disagreements.txt create mode 100644 .besouro/20160928160354283/randomHeuristicEpisodes.txt create mode 100644 .besouro/20160928160354283/userComments.txt create mode 100644 .besouro/20160928160354283/zorroEpisodes.txt diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt new file mode 100644 index 0000000..cf82c1c --- /dev/null +++ b/.besouro/20160928160354283/actions.txt @@ -0,0 +1,12 @@ +FileOpenedAction 1475067834608 TestRomanNumerals.java 159 1 1 0 +RefactoringAction 1475067852710 TestRomanNumerals.java RENAME test()=>void testIntegerTo() METHOD +RefactoringAction 1475067855719 TestRomanNumerals.java RENAME testIntegerTo()=>void testInteger() METHOD +RefactoringAction 1475067861231 TestRomanNumerals.java RENAME testInteger()=>void testInteger_() METHOD +RefactoringAction 1475067862740 TestRomanNumerals.java RENAME testInteger_()=>void testInteger_IV() METHOD +RefactoringAction 1475067864748 TestRomanNumerals.java RENAME testInteger_IV()=>void testInteger_I() METHOD +RefactoringAction 1475067866259 TestRomanNumerals.java RENAME testInteger_I()=>void testInteger_I_0() METHOD +RefactoringAction 1475067878268 TestRomanNumerals.java RENAME testInteger_I_0()=>void testInteger_I_() METHOD +RefactoringAction 1475067879779 TestRomanNumerals.java RENAME testInteger_I_()=>void testInteger_I_0() METHOD +RefactoringAction 1475067888294 TestRomanNumerals.java RENAME testInteger_I_0()=>void testConvertToInteger_I_0() METHOD +RefactoringAction 1475067908332 TestRomanNumerals.java ADD void initialize() METHOD +EditAction 1475067915207 TestRomanNumerals.java 207 2 0 0 diff --git a/.besouro/20160928160354283/besouroEpisodes.txt b/.besouro/20160928160354283/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160354283/disagreements.txt b/.besouro/20160928160354283/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160354283/randomHeuristicEpisodes.txt b/.besouro/20160928160354283/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160354283/userComments.txt b/.besouro/20160928160354283/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928160354283/zorroEpisodes.txt b/.besouro/20160928160354283/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5d1de75..a9fe7de 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -3,10 +3,14 @@ import org.junit.Test; public class TestRomanNumerals { - + @Before + private void initialize() + { + mNumerals = + } @Test - public void test() { - fail("Not yet implemented"); + public void testConvertToInteger_I_0() { + } } From e6d23d6d7d29d3b244f3c4321d13115e742930f3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:05:22 +0300 Subject: [PATCH 002/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index cf82c1c..7248c96 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -10,3 +10,8 @@ RefactoringAction 1475067879779 TestRomanNumerals.java RENAME testInteger_I_()=> RefactoringAction 1475067888294 TestRomanNumerals.java RENAME testInteger_I_0()=>void testConvertToInteger_I_0() METHOD RefactoringAction 1475067908332 TestRomanNumerals.java ADD void initialize() METHOD EditAction 1475067915207 TestRomanNumerals.java 207 2 0 0 +CompilationAction 1475067916506 TestRomanNumerals.java +CompilationAction 1475067916508 TestRomanNumerals.java +CompilationAction 1475067916509 TestRomanNumerals.java +CompilationAction 1475067916510 TestRomanNumerals.java +EditAction 1475067921690 TestRomanNumerals.java 227 2 1 0 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a9fe7de..8bead2a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -6,7 +6,7 @@ public class TestRomanNumerals { @Before private void initialize() { - mNumerals = + mNumerals = new RomanNumerals(); } @Test public void testConvertToInteger_I_0() { From b56a4ae448cb3ba9f276e351c79277fa084164f6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:05:37 +0300 Subject: [PATCH 003/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 7248c96..ac42eed 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -15,3 +15,9 @@ CompilationAction 1475067916508 TestRomanNumerals.java CompilationAction 1475067916509 TestRomanNumerals.java CompilationAction 1475067916510 TestRomanNumerals.java EditAction 1475067921690 TestRomanNumerals.java 227 2 1 0 +CompilationAction 1475067922947 TestRomanNumerals.java +CompilationAction 1475067922948 TestRomanNumerals.java +CompilationAction 1475067934500 TestRomanNumerals.java +CompilationAction 1475067934502 TestRomanNumerals.java +CompilationAction 1475067934666 TestRomanNumerals.java +EditAction 1475067936547 TestRomanNumerals.java 256 2 1 0 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 8bead2a..d617ab2 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -3,11 +3,13 @@ import org.junit.Test; public class TestRomanNumerals { + RomanNumerals mNumerals; + @Before - private void initialize() - { + private void initialize() { mNumerals = new RomanNumerals(); } + @Test public void testConvertToInteger_I_0() { From af065dfcfc2b50013fc1d2841fa838a0a5bbabc2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:05:43 +0300 Subject: [PATCH 004/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 2 ++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index ac42eed..0114974 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -21,3 +21,5 @@ CompilationAction 1475067934500 TestRomanNumerals.java CompilationAction 1475067934502 TestRomanNumerals.java CompilationAction 1475067934666 TestRomanNumerals.java EditAction 1475067936547 TestRomanNumerals.java 256 2 1 0 +CompilationAction 1475067937895 TestRomanNumerals.java +EditAction 1475067943236 TestRomanNumerals.java 270 2 1 0 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d617ab2..dc32804 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -12,7 +12,7 @@ private void initialize() { @Test public void testConvertToInteger_I_0() { - + assertEquals() } } From 4983ebe0475e9ac2d056317a0dd25a9217051de1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:06:20 +0300 Subject: [PATCH 005/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 8 ++++++++ tests/TestRomanNumerals.java | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 0114974..a71217d 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -23,3 +23,11 @@ CompilationAction 1475067934666 TestRomanNumerals.java EditAction 1475067936547 TestRomanNumerals.java 256 2 1 0 CompilationAction 1475067937895 TestRomanNumerals.java EditAction 1475067943236 TestRomanNumerals.java 270 2 1 0 +CompilationAction 1475067944524 TestRomanNumerals.java +CompilationAction 1475067944525 TestRomanNumerals.java +CompilationAction 1475067944526 TestRomanNumerals.java +RefactoringAction 1475067961109 TestRomanNumerals.java ADD import org.junit.Before IMPORT +CompilationAction 1475067968392 TestRomanNumerals.java +CompilationAction 1475067968394 TestRomanNumerals.java +CompilationAction 1475067968396 TestRomanNumerals.java +EditAction 1475067980068 TestRomanNumerals.java 345 2 1 0 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index dc32804..fd47026 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,5 +1,6 @@ import static org.junit.Assert.*; +import org.junit.Before; import org.junit.Test; public class TestRomanNumerals { @@ -11,8 +12,9 @@ private void initialize() { } @Test - public void testConvertToInteger_I_0() { - assertEquals() + public void testConvertToInteger_I_1() { + int integer = mNumerals.convertToInteger("I"); + assertEquals(1) } } From 53d5741901d674237412c9b4a57d9d7317db8616 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:15 +0300 Subject: [PATCH 006/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 19 +++++++++++++++ tests/TestRomanNumerals.java | 32 ++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index a71217d..be69c20 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -31,3 +31,22 @@ CompilationAction 1475067968392 TestRomanNumerals.java CompilationAction 1475067968394 TestRomanNumerals.java CompilationAction 1475067968396 TestRomanNumerals.java EditAction 1475067980068 TestRomanNumerals.java 345 2 1 0 +CompilationAction 1475067981036 TestRomanNumerals.java +CompilationAction 1475067981037 TestRomanNumerals.java +CompilationAction 1475067985179 TestRomanNumerals.java +RefactoringAction 1475067988561 TestRomanNumerals.java ADD void testConvertToInteger_I_1()/2 METHOD +RefactoringAction 1475067988564 TestRomanNumerals.java ADD void testConvertToInteger_I_1()/3 METHOD +RefactoringAction 1475068010115 TestRomanNumerals.java RENAME testConvertToInteger_I_1()/3=>void testConvertToInteger_I_3() METHOD +RefactoringAction 1475068011125 TestRomanNumerals.java RENAME testConvertToInteger_I_3()=>void testConvertToInteger_III_3() METHOD +RefactoringAction 1475068013135 TestRomanNumerals.java RENAME testConvertToInteger_I_1()/2=>void testConvertToInteger_II_1() METHOD +RefactoringAction 1475068015648 TestRomanNumerals.java ADD void testConvertToInteger_III_3()/2 METHOD +RefactoringAction 1475068017659 TestRomanNumerals.java RENAME testConvertToInteger_III_3()/2=>void testConvertToInteger_IV_3() METHOD +RefactoringAction 1475068021671 TestRomanNumerals.java ADD void testConvertToInteger_IV_3()/2 METHOD +RefactoringAction 1475068022682 TestRomanNumerals.java RENAME testConvertToInteger_IV_3()/2=>void testConvertToInteger_IV_4() METHOD +RefactoringAction 1475068023694 TestRomanNumerals.java RENAME testConvertToInteger_IV_4()=>void testConvertToInteger_V_4() METHOD +RefactoringAction 1475068026701 TestRomanNumerals.java RENAME testConvertToInteger_V_4()=>void testConvertToInteger_VI_5() METHOD +RefactoringAction 1475068028711 TestRomanNumerals.java RENAME testConvertToInteger_VI_5()=>void testConvertToInteger_V_5() METHOD +RefactoringAction 1475068030722 TestRomanNumerals.java ADD void testConvertToInteger_V_5()/2 METHOD +RefactoringAction 1475068032232 TestRomanNumerals.java RENAME testConvertToInteger_V_5()/2=>void testConvertToInteger_V_7() METHOD +RefactoringAction 1475068034252 TestRomanNumerals.java RENAME testConvertToInteger_V_7()=>void testConvertToInteger_V_6() METHOD +EditAction 1475068035456 TestRomanNumerals.java 1017 7 13 6 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index fd47026..e578536 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -10,11 +10,39 @@ public class TestRomanNumerals { private void initialize() { mNumerals = new RomanNumerals(); } - + @Test public void testConvertToInteger_I_1() { int integer = mNumerals.convertToInteger("I"); - assertEquals(1) + assertEquals(1, integer); + } + + @Test + public void testConvertToInteger_II_1() { + int integer = mNumerals.convertToInteger("II"); + assertEquals(1, integer); + } + + @Test + public void testConvertToInteger_III_3() { + int integer = mNumerals.convertToInteger("III"); + assertEquals(1, integer); + } + @Test + public void testConvertToInteger_IV_3() { + int integer = mNumerals.convertToInteger("III"); + assertEquals(1, integer); + } + @Test + public void testConvertToInteger_V_5() { + int integer = mNumerals.convertToInteger("III"); + assertEquals(1, integer); + } + + @Test + public void testConvertToInteger_VI_6() { + int integer = mNumerals.convertToInteger("III"); + assertEquals(1, integer); } } From 15fce959a29c0bb1467ab079938511a07defec6f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:38 +0300 Subject: [PATCH 007/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 2 ++ tests/TestRomanNumerals.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index be69c20..3e6643a 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -50,3 +50,5 @@ RefactoringAction 1475068030722 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475068032232 TestRomanNumerals.java RENAME testConvertToInteger_V_5()/2=>void testConvertToInteger_V_7() METHOD RefactoringAction 1475068034252 TestRomanNumerals.java RENAME testConvertToInteger_V_7()=>void testConvertToInteger_V_6() METHOD EditAction 1475068035456 TestRomanNumerals.java 1017 7 13 6 +RefactoringAction 1475068051317 TestRomanNumerals.java RENAME testConvertToInteger_IV_3()=>void testConvertToInteger_IV_4() METHOD +EditAction 1475068057872 TestRomanNumerals.java 1013 7 13 6 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index e578536..e76c83a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -26,23 +26,23 @@ public void testConvertToInteger_II_1() { @Test public void testConvertToInteger_III_3() { int integer = mNumerals.convertToInteger("III"); - assertEquals(1, integer); + assertEquals(3, integer); } @Test - public void testConvertToInteger_IV_3() { - int integer = mNumerals.convertToInteger("III"); - assertEquals(1, integer); + public void testConvertToInteger_IV_4() { + int integer = mNumerals.convertToInteger("IV"); + assertEquals(4, integer); } @Test public void testConvertToInteger_V_5() { - int integer = mNumerals.convertToInteger("III"); - assertEquals(1, integer); + int integer = mNumerals.convertToInteger("V"); + assertEquals(5, integer); } @Test public void testConvertToInteger_VI_6() { - int integer = mNumerals.convertToInteger("III"); - assertEquals(1, integer); + int integer = mNumerals.convertToInteger("VI"); + assertEquals(6, integer); } } From 52ab0f81f570cb8feb8d4335c96aabf39b42dd3a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:43 +0300 Subject: [PATCH 008/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + tests/TestRomanNumerals.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 3e6643a..b4ea4c0 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -52,3 +52,4 @@ RefactoringAction 1475068034252 TestRomanNumerals.java RENAME testConvertToInteg EditAction 1475068035456 TestRomanNumerals.java 1017 7 13 6 RefactoringAction 1475068051317 TestRomanNumerals.java RENAME testConvertToInteger_IV_3()=>void testConvertToInteger_IV_4() METHOD EditAction 1475068057872 TestRomanNumerals.java 1013 7 13 6 +EditAction 1475068063214 TestRomanNumerals.java 1017 7 13 6 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index e76c83a..e371507 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,7 +18,7 @@ public void testConvertToInteger_I_1() { } @Test - public void testConvertToInteger_II_1() { + public void testConvertToInteger_II_2() { int integer = mNumerals.convertToInteger("II"); assertEquals(1, integer); } @@ -28,11 +28,13 @@ public void testConvertToInteger_III_3() { int integer = mNumerals.convertToInteger("III"); assertEquals(3, integer); } + @Test public void testConvertToInteger_IV_4() { int integer = mNumerals.convertToInteger("IV"); assertEquals(4, integer); } + @Test public void testConvertToInteger_V_5() { int integer = mNumerals.convertToInteger("V"); From dae03b4ac73f3303992581ac77f6807c2996f125 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:07:46 +0300 Subject: [PATCH 009/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index b4ea4c0..e05fa4b 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -53,3 +53,4 @@ EditAction 1475068035456 TestRomanNumerals.java 1017 7 13 6 RefactoringAction 1475068051317 TestRomanNumerals.java RENAME testConvertToInteger_IV_3()=>void testConvertToInteger_IV_4() METHOD EditAction 1475068057872 TestRomanNumerals.java 1013 7 13 6 EditAction 1475068063214 TestRomanNumerals.java 1017 7 13 6 +EditAction 1475068066457 TestRomanNumerals.java 1017 7 13 6 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index e371507..b62a84f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -20,7 +20,7 @@ public void testConvertToInteger_I_1() { @Test public void testConvertToInteger_II_2() { int integer = mNumerals.convertToInteger("II"); - assertEquals(1, integer); + assertEquals(2, integer); } @Test From 38f31424257ff8fd8ad4de464d050c8b065b5ca1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:08:34 +0300 Subject: [PATCH 010/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index e05fa4b..7673748 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -54,3 +54,8 @@ RefactoringAction 1475068051317 TestRomanNumerals.java RENAME testConvertToInteg EditAction 1475068057872 TestRomanNumerals.java 1013 7 13 6 EditAction 1475068063214 TestRomanNumerals.java 1017 7 13 6 EditAction 1475068066457 TestRomanNumerals.java 1017 7 13 6 +UnitTestCaseAction 1475068073113 TennisGameTest.java OK +UnitTestSessionAction 1475068073115 TennisGameTest.java OK +UnitTestCaseAction 1475068085165 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068085166 TestRomanNumerals.java FAIL +EditAction 1475068113972 TestRomanNumerals.java 1016 7 13 6 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index b62a84f..16f797c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -7,7 +7,7 @@ public class TestRomanNumerals { RomanNumerals mNumerals; @Before - private void initialize() { + public void initialize() { mNumerals = new RomanNumerals(); } From a8c4d95c66b69c0be570ae7df33f0e74de5c5cd2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:10:13 +0300 Subject: [PATCH 011/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 25 ++++++++++++++++++ tests/TestRomanNumerals.java | 36 +++++++++++++++++++++----- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 7673748..74614f2 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -59,3 +59,28 @@ UnitTestSessionAction 1475068073115 TennisGameTest.java OK UnitTestCaseAction 1475068085165 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068085166 TestRomanNumerals.java FAIL EditAction 1475068113972 TestRomanNumerals.java 1016 7 13 6 +UnitTestCaseAction 1475068115540 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068115541 TestRomanNumerals.java FAIL +RefactoringAction 1475068131869 TestRomanNumerals.java ADD void testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475068135379 TestRomanNumerals.java REMOVE testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475068138391 TestRomanNumerals.java ADD void testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475068142402 TestRomanNumerals.java REMOVE testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475068150418 TestRomanNumerals.java REMOVE testConvertToInteger_V_5() METHOD +RefactoringAction 1475068152428 TestRomanNumerals.java ADD void testConvertToInteger_V_5() METHOD +RefactoringAction 1475068154438 TestRomanNumerals.java ADD void testConvertToInteger_V_5()/2 METHOD +RefactoringAction 1475068155949 TestRomanNumerals.java RENAME testConvertToInteger_V_5()/2=>void testConvertToInteger__5() METHOD +RefactoringAction 1475068156961 TestRomanNumerals.java RENAME testConvertToInteger__5()=>void testConvertToInteger_X_5() METHOD +RefactoringAction 1475068157971 TestRomanNumerals.java RENAME testConvertToInteger_X_5()=>void testConvertToInteger_X_10() METHOD +RefactoringAction 1475068166502 TestRomanNumerals.java ADD void testConvertToInteger_X_10()/2 METHOD +RefactoringAction 1475068169011 TestRomanNumerals.java RENAME testConvertToInteger_X_10()/2=>void testConvertToInteger_C_10() METHOD +RefactoringAction 1475068173029 TestRomanNumerals.java RENAME testConvertToInteger_C_10()=>void testConvertToInteger_C_100() METHOD +RefactoringAction 1475068180550 TestRomanNumerals.java ADD void testConvertToInteger_C_100()/2 METHOD +RefactoringAction 1475068182061 TestRomanNumerals.java RENAME testConvertToInteger_C_100()/2=>void testConvertToInteger_L_100() METHOD +RefactoringAction 1475068183568 TestRomanNumerals.java RENAME testConvertToInteger_L_100()=>void testConvertToInteger_L_50() METHOD +RefactoringAction 1475068192594 TestRomanNumerals.java ADD void testConvertToInteger_L_50()/2 METHOD +RefactoringAction 1475068196115 TestRomanNumerals.java REMOVE testConvertToInteger_L_50()/2 METHOD +RefactoringAction 1475068200135 TestRomanNumerals.java ADD void testConvertToInteger_L_50()/2 METHOD +RefactoringAction 1475068201647 TestRomanNumerals.java RENAME testConvertToInteger_L_50()/2=>void testConvertToInteger__50() METHOD +RefactoringAction 1475068202658 TestRomanNumerals.java RENAME testConvertToInteger__50()=>void testConvertToInteger_D_50() METHOD +RefactoringAction 1475068207678 TestRomanNumerals.java RENAME testConvertToInteger_D_50()=>void testConvertToInteger_D_500() METHOD +EditAction 1475068212851 TestRomanNumerals.java 1551 11 21 10 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 16f797c..12858a2 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -16,6 +16,36 @@ public void testConvertToInteger_I_1() { int integer = mNumerals.convertToInteger("I"); assertEquals(1, integer); } + + @Test + public void testConvertToInteger_V_5() { + int integer = mNumerals.convertToInteger("V"); + assertEquals(5, integer); + } + @Test + public void testConvertToInteger_X_10() { + int integer = mNumerals.convertToInteger("X"); + assertEquals(10, integer); + } + + @Test + public void testConvertToInteger_L_50() { + int integer = mNumerals.convertToInteger("L"); + assertEquals(50, integer); + } + + @Test + public void testConvertToInteger_C_100() { + int integer = mNumerals.convertToInteger("C"); + assertEquals(100, integer); + } + + @Test + public void testConvertToInteger_D_500() { + int integer = mNumerals.convertToInteger("D"); + assertEquals(500, integer); + } + @Test public void testConvertToInteger_II_2() { @@ -34,12 +64,6 @@ public void testConvertToInteger_IV_4() { int integer = mNumerals.convertToInteger("IV"); assertEquals(4, integer); } - - @Test - public void testConvertToInteger_V_5() { - int integer = mNumerals.convertToInteger("V"); - assertEquals(5, integer); - } @Test public void testConvertToInteger_VI_6() { From a2a0b6f27fd9e3b9d738b3c9549ded7bc9653bc0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:10:28 +0300 Subject: [PATCH 012/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 4 ++++ tests/TestRomanNumerals.java | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 74614f2..f224511 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -84,3 +84,7 @@ RefactoringAction 1475068201647 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475068202658 TestRomanNumerals.java RENAME testConvertToInteger__50()=>void testConvertToInteger_D_50() METHOD RefactoringAction 1475068207678 TestRomanNumerals.java RENAME testConvertToInteger_D_50()=>void testConvertToInteger_D_500() METHOD EditAction 1475068212851 TestRomanNumerals.java 1551 11 21 10 +RefactoringAction 1475068216713 TestRomanNumerals.java ADD void testConvertToInteger_D_500()/2 METHOD +RefactoringAction 1475068220760 TestRomanNumerals.java RENAME testConvertToInteger_D_500()/2=>void testConvertToInteger_M_500() METHOD +RefactoringAction 1475068223270 TestRomanNumerals.java RENAME testConvertToInteger_M_500()=>void testConvertToInteger_M_1000() METHOD +EditAction 1475068228397 TestRomanNumerals.java 1686 12 23 11 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 12858a2..30358c0 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -39,12 +39,18 @@ public void testConvertToInteger_C_100() { int integer = mNumerals.convertToInteger("C"); assertEquals(100, integer); } - + @Test public void testConvertToInteger_D_500() { int integer = mNumerals.convertToInteger("D"); assertEquals(500, integer); } + + @Test + public void testConvertToInteger_M_1000() { + int integer = mNumerals.convertToInteger("D"); + assertEquals(1000, integer); + } @Test From 908dd129039cde6a33eb6528f424097323ca5fd1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:11:17 +0300 Subject: [PATCH 013/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + tests/TestRomanNumerals.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index f224511..391f4bc 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -88,3 +88,4 @@ RefactoringAction 1475068216713 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475068220760 TestRomanNumerals.java RENAME testConvertToInteger_D_500()/2=>void testConvertToInteger_M_500() METHOD RefactoringAction 1475068223270 TestRomanNumerals.java RENAME testConvertToInteger_M_500()=>void testConvertToInteger_M_1000() METHOD EditAction 1475068228397 TestRomanNumerals.java 1686 12 23 11 +EditAction 1475068277137 TestRomanNumerals.java 1684 12 23 11 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 30358c0..f2315d8 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -48,11 +48,10 @@ public void testConvertToInteger_D_500() { @Test public void testConvertToInteger_M_1000() { - int integer = mNumerals.convertToInteger("D"); + int integer = mNumerals.convertToInteger("M"); assertEquals(1000, integer); } - @Test public void testConvertToInteger_II_2() { int integer = mNumerals.convertToInteger("II"); From eaee075df4e272881af066dd7303dc2ba5488f96 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:15:40 +0300 Subject: [PATCH 014/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + src/RomanNumerals.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 391f4bc..476d4ef 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -89,3 +89,4 @@ RefactoringAction 1475068220760 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475068223270 TestRomanNumerals.java RENAME testConvertToInteger_M_500()=>void testConvertToInteger_M_1000() METHOD EditAction 1475068228397 TestRomanNumerals.java 1686 12 23 11 EditAction 1475068277137 TestRomanNumerals.java 1684 12 23 11 +EditAction 1475068539654 RomanNumerals.java 211 1 0 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 20904f0..649059b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,8 +1,13 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - // To be Implemented - return 0; - + switch(romanNum) + case "I": + case "V": + case "X": + case "L": + case "C": + case "D": return 500; + case "M": return 1000; } } From 00aa8aba36d5516af99bb23fd8d82e29fafeaa1e Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:16:07 +0300 Subject: [PATCH 015/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 9 +++++++++ src/RomanNumerals.java | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 476d4ef..d3923a0 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -90,3 +90,12 @@ RefactoringAction 1475068223270 TestRomanNumerals.java RENAME testConvertToInteg EditAction 1475068228397 TestRomanNumerals.java 1686 12 23 11 EditAction 1475068277137 TestRomanNumerals.java 1684 12 23 11 EditAction 1475068539654 RomanNumerals.java 211 1 0 0 +CompilationAction 1475068540960 RomanNumerals.java +CompilationAction 1475068540962 RomanNumerals.java +CompilationAction 1475068547767 RomanNumerals.java +CompilationAction 1475068547926 RomanNumerals.java +CompilationAction 1475068547927 RomanNumerals.java +CompilationAction 1475068561285 RomanNumerals.java +CompilationAction 1475068561457 RomanNumerals.java +CompilationAction 1475068561458 RomanNumerals.java +EditAction 1475068566895 RomanNumerals.java 286 1 0 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 649059b..0e13f91 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -2,12 +2,13 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { switch(romanNum) - case "I": - case "V": - case "X": - case "L": - case "C": + case "I": return 1; + case "V": return 5; + case "X": return 10; + case "L": return 50; + case "C": return 100; case "D": return 500; case "M": return 1000; + default return -1; } } From 4e87bea8f0f9fb1b515946807fb1aab2d9a008b1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:16:10 +0300 Subject: [PATCH 016/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index d3923a0..616c650 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -99,3 +99,6 @@ CompilationAction 1475068561285 RomanNumerals.java CompilationAction 1475068561457 RomanNumerals.java CompilationAction 1475068561458 RomanNumerals.java EditAction 1475068566895 RomanNumerals.java 286 1 0 0 +CompilationAction 1475068568312 RomanNumerals.java +CompilationAction 1475068568313 RomanNumerals.java +EditAction 1475068569695 RomanNumerals.java 287 1 0 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 0e13f91..1ffdff3 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -9,6 +9,6 @@ public int convertToInteger(String romanNum) { case "C": return 100; case "D": return 500; case "M": return 1000; - default return -1; + default: return -1; } } From b2baa43f15766b7f715c175a4fc9b929fa0d89cb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:21:23 +0300 Subject: [PATCH 017/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ src/RomanNumerals.java | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 616c650..6e32bd1 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -102,3 +102,9 @@ EditAction 1475068566895 RomanNumerals.java 286 1 0 0 CompilationAction 1475068568312 RomanNumerals.java CompilationAction 1475068568313 RomanNumerals.java EditAction 1475068569695 RomanNumerals.java 287 1 0 0 +CompilationAction 1475068570866 RomanNumerals.java +CompilationAction 1475068570867 RomanNumerals.java +CompilationAction 1475068574965 RomanNumerals.java +UnitTestCaseAction 1475068583249 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475068583251 TestRomanNumerals.java FAIL +EditAction 1475068882724 RomanNumerals.java 366 1 3 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1ffdff3..e633a8c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,7 +1,12 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - switch(romanNum) + int retValue = 0; + for (char c : romanNum.toCharArray()) { + + } + + switch(romanNum) { case "I": return 1; case "V": return 5; case "X": return 10; @@ -10,5 +15,6 @@ public int convertToInteger(String romanNum) { case "D": return 500; case "M": return 1000; default: return -1; + } } } From c6d385f420f052a90dd4c44c077263359f47c0c2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:25:44 +0300 Subject: [PATCH 018/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 14 ++++++++++ src/RomanNumerals.java | 38 ++++++++++++++++++-------- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 6e32bd1..4c25cc0 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -108,3 +108,17 @@ CompilationAction 1475068574965 RomanNumerals.java UnitTestCaseAction 1475068583249 TestRomanNumerals.java FAIL UnitTestSessionAction 1475068583251 TestRomanNumerals.java FAIL EditAction 1475068882724 RomanNumerals.java 366 1 3 0 +CompilationAction 1475068993758 RomanNumerals.java +CompilationAction 1475068993759 RomanNumerals.java +CompilationAction 1475069013898 RomanNumerals.java +CompilationAction 1475069013900 RomanNumerals.java +CompilationAction 1475069014030 RomanNumerals.java +CompilationAction 1475069014031 RomanNumerals.java +CompilationAction 1475069014032 RomanNumerals.java +RefactoringAction 1475069050867 RomanNumerals.java ADD int getElementaryValue() METHOD +RefactoringAction 1475069056891 RomanNumerals.java RENAME getElementaryValue()=>int getElementaryValue(char) METHOD +CompilationAction 1475069142291 RomanNumerals.java +CompilationAction 1475069142292 RomanNumerals.java +CompilationAction 1475069142293 RomanNumerals.java +CompilationAction 1475069142495 RomanNumerals.java +EditAction 1475069144127 RomanNumerals.java 678 2 2 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e633a8c..a565995 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,19 +1,35 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - int retValue = 0; - for (char c : romanNum.toCharArray()) { + /* + int retValue = -1; + + int lastSub = 0; + for (int i = 0; i < romanNum.length(); i++) { + if (i == 0 && romanNum.length() > 1) { + lastSub = 1; + continue; + } + + retValue += getElementaryValue(); + } - - switch(romanNum) { - case "I": return 1; - case "V": return 5; - case "X": return 10; - case "L": return 50; - case "C": return 100; - case "D": return 500; - case "M": return 1000; + */ + if (romanNum.length() > 0) + return getElementaryValue(romanNum.charAt(0)); + else return -1; + } + + private int getElementaryValue(char character) { + switch(character) { + case 'I': return 1; + case 'V': return 5; + case 'X': return 10; + case 'L': return 50; + case 'C': return 100; + case 'D': return 500; + case 'M': return 1000; default: return -1; } } From 6d3341c9279060b53b7364816d9ef16591fd1949 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:26:30 +0300 Subject: [PATCH 019/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ src/RomanNumerals.java | 11 +++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 4c25cc0..7db3c02 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -122,3 +122,8 @@ CompilationAction 1475069142292 RomanNumerals.java CompilationAction 1475069142293 RomanNumerals.java CompilationAction 1475069142495 RomanNumerals.java EditAction 1475069144127 RomanNumerals.java 678 2 2 0 +UnitTestCaseAction 1475069152138 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069152140 TestRomanNumerals.java FAIL +RefactoringAction 1475069162168 RomanNumerals.java REMOVE getElementaryValue(char) METHOD +RefactoringAction 1475069169688 RomanNumerals.java ADD int getElementaryValue(char) METHOD +EditAction 1475069190486 RomanNumerals.java 603 2 5 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a565995..85a751c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,7 +1,6 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - /* int retValue = -1; int lastSub = 0; @@ -11,14 +10,10 @@ public int convertToInteger(String romanNum) { continue; } - retValue += getElementaryValue(); - - + retValue += getElementaryValue(romanNum.charAt(i)); } - */ - if (romanNum.length() > 0) - return getElementaryValue(romanNum.charAt(0)); - else return -1; + + return retValue; } private int getElementaryValue(char character) { From da5c12c98526da5c84ec489f1efe2badac1b8414 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:26:40 +0300 Subject: [PATCH 020/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + src/RomanNumerals.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 7db3c02..bb3f8ea 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -127,3 +127,4 @@ UnitTestSessionAction 1475069152140 TestRomanNumerals.java FAIL RefactoringAction 1475069162168 RomanNumerals.java REMOVE getElementaryValue(char) METHOD RefactoringAction 1475069169688 RomanNumerals.java ADD int getElementaryValue(char) METHOD EditAction 1475069190486 RomanNumerals.java 603 2 5 0 +EditAction 1475069200478 RomanNumerals.java 601 2 5 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 85a751c..18e30b2 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,7 +1,7 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - int retValue = -1; + int retValue = 0; int lastSub = 0; for (int i = 0; i < romanNum.length(); i++) { @@ -25,7 +25,7 @@ private int getElementaryValue(char character) { case 'C': return 100; case 'D': return 500; case 'M': return 1000; - default: return -1; + default: return 0; } } } From 2d1e9cdfc12ab0017c11c72d72fab133c07efc8e Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:28:46 +0300 Subject: [PATCH 021/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 4 ++++ src/RomanNumerals.java | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index bb3f8ea..28625b3 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -128,3 +128,7 @@ RefactoringAction 1475069162168 RomanNumerals.java REMOVE getElementaryValue(cha RefactoringAction 1475069169688 RomanNumerals.java ADD int getElementaryValue(char) METHOD EditAction 1475069190486 RomanNumerals.java 603 2 5 0 EditAction 1475069200478 RomanNumerals.java 601 2 5 0 +RefactoringAction 1475069281391 RomanNumerals.java ADD boolean isSubtractableValue FIELD +RefactoringAction 1475069286402 RomanNumerals.java RENAME isSubtractableValue=>boolean isSubtractableElementaryValue() METHOD +RefactoringAction 1475069291411 RomanNumerals.java RENAME isSubtractableElementaryValue()=>boolean isSubtractableElementaryValue(char) METHOD +EditAction 1475069325885 RomanNumerals.java 815 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 18e30b2..7b4d686 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,7 +5,8 @@ public int convertToInteger(String romanNum) { int lastSub = 0; for (int i = 0; i < romanNum.length(); i++) { - if (i == 0 && romanNum.length() > 1) { + if (i == 0 && romanNum.length() >= 2 && + getElementaryValue(romanNum.charAt(i))) { lastSub = 1; continue; } @@ -16,6 +17,17 @@ public int convertToInteger(String romanNum) { return retValue; } + private boolean isSubtractableElementaryValue(char character) { + switch(character) { + case 'I': + case 'X': + case 'C': + return true; + } + + return false; + } + private int getElementaryValue(char character) { switch(character) { case 'I': return 1; From 8ac0a37cd8a8ce5c3b2f156864094e381ac33d43 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:31:53 +0300 Subject: [PATCH 022/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ src/RomanNumerals.java | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 28625b3..a62d4af 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -132,3 +132,8 @@ RefactoringAction 1475069281391 RomanNumerals.java ADD boolean isSubtractableVal RefactoringAction 1475069286402 RomanNumerals.java RENAME isSubtractableValue=>boolean isSubtractableElementaryValue() METHOD RefactoringAction 1475069291411 RomanNumerals.java RENAME isSubtractableElementaryValue()=>boolean isSubtractableElementaryValue(char) METHOD EditAction 1475069325885 RomanNumerals.java 815 3 7 0 +CompilationAction 1475069327065 RomanNumerals.java +RefactoringAction 1475069345024 RomanNumerals.java RENAME isSubtractableElementaryValue(char)=>boolean isSubtraElementaryValue(char) METHOD +RefactoringAction 1475069351037 RomanNumerals.java RENAME isSubtraElementaryValue(char)=>boolean canBeSubtrahendElementaryValue(char) METHOD +CompilationAction 1475069504699 RomanNumerals.java +EditAction 1475069512759 RomanNumerals.java 970 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 7b4d686..e1d6dce 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,19 +5,21 @@ public int convertToInteger(String romanNum) { int lastSub = 0; for (int i = 0; i < romanNum.length(); i++) { - if (i == 0 && romanNum.length() >= 2 && - getElementaryValue(romanNum.charAt(i))) { - lastSub = 1; - continue; + if ((i + 1 < romanNum.length()) && + canBeSubtrahendElementaryValue(romanNum.charAt(i)) && + getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { + lastSub = getElementaryValue(romanNum.charAt(i)); + + } else { + lastSub = 0; + retValue += getElementaryValue(romanNum.charAt(i)); } - - retValue += getElementaryValue(romanNum.charAt(i)); } return retValue; } - private boolean isSubtractableElementaryValue(char character) { + private boolean canBeSubtrahendElementaryValue(char character) { switch(character) { case 'I': case 'X': From 4c62e9887a70776ae2119593e1a9c9929401c37a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:32:54 +0300 Subject: [PATCH 023/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index a62d4af..e33051e 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -137,3 +137,6 @@ RefactoringAction 1475069345024 RomanNumerals.java RENAME isSubtractableElementa RefactoringAction 1475069351037 RomanNumerals.java RENAME isSubtraElementaryValue(char)=>boolean canBeSubtrahendElementaryValue(char) METHOD CompilationAction 1475069504699 RomanNumerals.java EditAction 1475069512759 RomanNumerals.java 970 3 7 0 +UnitTestCaseAction 1475069524340 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069524341 TestRomanNumerals.java FAIL +EditAction 1475069573638 RomanNumerals.java 980 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e1d6dce..b058592 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -12,7 +12,7 @@ public int convertToInteger(String romanNum) { } else { lastSub = 0; - retValue += getElementaryValue(romanNum.charAt(i)); + retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; } } From 14c1a705773ecbb348f54b95d91bd018817fb270 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:28 +0300 Subject: [PATCH 024/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index e33051e..7f38da9 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -140,3 +140,6 @@ EditAction 1475069512759 RomanNumerals.java 970 3 7 0 UnitTestCaseAction 1475069524340 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069524341 TestRomanNumerals.java FAIL EditAction 1475069573638 RomanNumerals.java 980 3 7 0 +UnitTestCaseAction 1475069575810 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069575811 TestRomanNumerals.java FAIL +EditAction 1475069607933 RomanNumerals.java 980 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index b058592..b99953a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -11,8 +11,8 @@ public int convertToInteger(String romanNum) { lastSub = getElementaryValue(romanNum.charAt(i)); } else { - lastSub = 0; retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; + lastSub = 0; } } From 147bece0c60fc35f28537c2cfb21715cf48e8380 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:33:38 +0300 Subject: [PATCH 025/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ src/RomanNumerals.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 7f38da9..1fdb309 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -143,3 +143,6 @@ EditAction 1475069573638 RomanNumerals.java 980 3 7 0 UnitTestCaseAction 1475069575810 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069575811 TestRomanNumerals.java FAIL EditAction 1475069607933 RomanNumerals.java 980 3 7 0 +UnitTestCaseAction 1475069609882 TestRomanNumerals.java OK +UnitTestSessionAction 1475069609883 TestRomanNumerals.java OK +EditAction 1475069618328 RomanNumerals.java 978 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index b99953a..3f7f41b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,8 +6,8 @@ public int convertToInteger(String romanNum) { int lastSub = 0; for (int i = 0; i < romanNum.length(); i++) { if ((i + 1 < romanNum.length()) && - canBeSubtrahendElementaryValue(romanNum.charAt(i)) && - getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { + canBeSubtrahendElementaryValue(romanNum.charAt(i)) && + getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { lastSub = getElementaryValue(romanNum.charAt(i)); } else { From a0f52c335e5a53a7ca5013ab656b69e44f461631 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:34:17 +0300 Subject: [PATCH 026/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 1fdb309..4529228 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -146,3 +146,9 @@ EditAction 1475069607933 RomanNumerals.java 980 3 7 0 UnitTestCaseAction 1475069609882 TestRomanNumerals.java OK UnitTestSessionAction 1475069609883 TestRomanNumerals.java OK EditAction 1475069618328 RomanNumerals.java 978 3 7 0 +RefactoringAction 1475069627431 TestRomanNumerals.java ADD void testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475069638952 TestRomanNumerals.java RENAME testConvertToInteger_VI_6()/2=>void testConvertToInteger_VI_() METHOD +RefactoringAction 1475069639964 TestRomanNumerals.java RENAME testConvertToInteger_VI_()=>void testConvertToInteger_VI_6()/2 METHOD +RefactoringAction 1475069650477 TestRomanNumerals.java RENAME testConvertToInteger_VI_6()/2=>void testConvertToInteger_VI_7() METHOD +RefactoringAction 1475069655489 TestRomanNumerals.java RENAME testConvertToInteger_VI_7()=>void testConvertToInteger_VII_7() METHOD +EditAction 1475069657439 TestRomanNumerals.java 1684 12 23 11 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f2315d8..3f22695 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -71,9 +71,8 @@ public void testConvertToInteger_IV_4() { } @Test - public void testConvertToInteger_VI_6() { + public void testConvertToInteger_VII_7() { int integer = mNumerals.convertToInteger("VI"); assertEquals(6, integer); } - } From 31c473753a463c47df278b20cbc0a88e7db2f504 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:34:23 +0300 Subject: [PATCH 027/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + tests/TestRomanNumerals.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 4529228..d3e933e 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -152,3 +152,4 @@ RefactoringAction 1475069639964 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475069650477 TestRomanNumerals.java RENAME testConvertToInteger_VI_6()/2=>void testConvertToInteger_VI_7() METHOD RefactoringAction 1475069655489 TestRomanNumerals.java RENAME testConvertToInteger_VI_7()=>void testConvertToInteger_VII_7() METHOD EditAction 1475069657439 TestRomanNumerals.java 1684 12 23 11 +EditAction 1475069662868 TestRomanNumerals.java 1685 12 23 11 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3f22695..ccd48bb 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -72,7 +72,7 @@ public void testConvertToInteger_IV_4() { @Test public void testConvertToInteger_VII_7() { - int integer = mNumerals.convertToInteger("VI"); - assertEquals(6, integer); + int integer = mNumerals.convertToInteger("VII"); + assertEquals(7, integer); } } From 4cf891f84a593b412cd85358752d05132d92e773 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:34:43 +0300 Subject: [PATCH 028/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index d3e933e..47f87b5 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -153,3 +153,8 @@ RefactoringAction 1475069650477 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475069655489 TestRomanNumerals.java RENAME testConvertToInteger_VI_7()=>void testConvertToInteger_VII_7() METHOD EditAction 1475069657439 TestRomanNumerals.java 1684 12 23 11 EditAction 1475069662868 TestRomanNumerals.java 1685 12 23 11 +UnitTestCaseAction 1475069666041 TestRomanNumerals.java OK +UnitTestSessionAction 1475069666042 TestRomanNumerals.java OK +RefactoringAction 1475069672522 TestRomanNumerals.java ADD void testConvertToInteger_VII_7()/2 METHOD +RefactoringAction 1475069677044 TestRomanNumerals.java RENAME testConvertToInteger_VII_7()/2=>void testConvertToInteger_VII_8() METHOD +EditAction 1475069682749 TestRomanNumerals.java 1821 13 25 12 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index ccd48bb..5b3f751 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -75,4 +75,10 @@ public void testConvertToInteger_VII_7() { int integer = mNumerals.convertToInteger("VII"); assertEquals(7, integer); } + + @Test + public void testConvertToInteger_VII_8() { + int integer = mNumerals.convertToInteger("VIII"); + assertEquals(8, integer); + } } From 6810ef5f51ab7674056b004600bc49bfe2759656 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:35:09 +0300 Subject: [PATCH 029/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 47f87b5..852e430 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -158,3 +158,8 @@ UnitTestSessionAction 1475069666042 TestRomanNumerals.java OK RefactoringAction 1475069672522 TestRomanNumerals.java ADD void testConvertToInteger_VII_7()/2 METHOD RefactoringAction 1475069677044 TestRomanNumerals.java RENAME testConvertToInteger_VII_7()/2=>void testConvertToInteger_VII_8() METHOD EditAction 1475069682749 TestRomanNumerals.java 1821 13 25 12 +UnitTestCaseAction 1475069684788 TestRomanNumerals.java OK +UnitTestSessionAction 1475069684789 TestRomanNumerals.java OK +RefactoringAction 1475069691072 TestRomanNumerals.java ADD void testConvertToInteger_VII_8()/2 METHOD +RefactoringAction 1475069698080 TestRomanNumerals.java RENAME testConvertToInteger_VII_8()/2=>void testConvertToInteger_VII_9() METHOD +EditAction 1475069709511 TestRomanNumerals.java 1953 14 27 13 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5b3f751..18f52cf 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -75,10 +75,16 @@ public void testConvertToInteger_VII_7() { int integer = mNumerals.convertToInteger("VII"); assertEquals(7, integer); } - + @Test public void testConvertToInteger_VII_8() { int integer = mNumerals.convertToInteger("VIII"); assertEquals(8, integer); } + + @Test + public void testConvertToInteger_VII_9() { + int integer = mNumerals.convertToInteger("IX"); + assertEquals(9, integer); + } } From 451a750dfd764678704c7a4d175b730ce5a6c8e2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:35:28 +0300 Subject: [PATCH 030/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 852e430..593eda1 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -163,3 +163,9 @@ UnitTestSessionAction 1475069684789 TestRomanNumerals.java OK RefactoringAction 1475069691072 TestRomanNumerals.java ADD void testConvertToInteger_VII_8()/2 METHOD RefactoringAction 1475069698080 TestRomanNumerals.java RENAME testConvertToInteger_VII_8()/2=>void testConvertToInteger_VII_9() METHOD EditAction 1475069709511 TestRomanNumerals.java 1953 14 27 13 +UnitTestCaseAction 1475069711640 TestRomanNumerals.java OK +UnitTestSessionAction 1475069711641 TestRomanNumerals.java OK +RefactoringAction 1475069715621 TestRomanNumerals.java ADD void testConvertToInteger_VII_9()/2 METHOD +RefactoringAction 1475069719134 TestRomanNumerals.java RENAME testConvertToInteger_VII_9()/2=>void testConvertToInteger_X_9() METHOD +RefactoringAction 1475069720146 TestRomanNumerals.java RENAME testConvertToInteger_X_9()=>void testConvertToInteger_X_10()/2 METHOD +EditAction 1475069728378 TestRomanNumerals.java 2086 15 29 14 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 18f52cf..d750612 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -87,4 +87,10 @@ public void testConvertToInteger_VII_9() { int integer = mNumerals.convertToInteger("IX"); assertEquals(9, integer); } + + @Test + public void testConvertToInteger_X_10() { + int integer = mNumerals.convertToInteger("X"); + assertEquals(10, integer); + } } From 63ee1885c6bfeaa00de2369548bc57cc243be258 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:35:55 +0300 Subject: [PATCH 031/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 10 ++++++++++ tests/TestRomanNumerals.java | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 593eda1..36d7f39 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -169,3 +169,13 @@ RefactoringAction 1475069715621 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475069719134 TestRomanNumerals.java RENAME testConvertToInteger_VII_9()/2=>void testConvertToInteger_X_9() METHOD RefactoringAction 1475069720146 TestRomanNumerals.java RENAME testConvertToInteger_X_9()=>void testConvertToInteger_X_10()/2 METHOD EditAction 1475069728378 TestRomanNumerals.java 2086 15 29 14 +CompilationAction 1475069729474 TestRomanNumerals.java +RefactoringAction 1475069738198 TestRomanNumerals.java RENAME testConvertToInteger_X_10()/2=>void testConvertToInteger_XX_10() METHOD +RefactoringAction 1475069739210 TestRomanNumerals.java RENAME testConvertToInteger_XX_10()=>void testConvertToInteger_XX_20() METHOD +CompilationAction 1475069743080 TestRomanNumerals.java +UnitTestCaseAction 1475069743695 TestRomanNumerals.java OK +UnitTestSessionAction 1475069743696 TestRomanNumerals.java OK +RefactoringAction 1475069747234 TestRomanNumerals.java ADD void testConvertToInteger_XX_20()/2 METHOD +RefactoringAction 1475069749747 TestRomanNumerals.java RENAME testConvertToInteger_XX_20()/2=>void testConvertToInteger_XXX_20() METHOD +RefactoringAction 1475069751259 TestRomanNumerals.java RENAME testConvertToInteger_XXX_20()=>void testConvertToInteger_XXX_30() METHOD +EditAction 1475069755576 TestRomanNumerals.java 2225 16 31 15 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d750612..9a882a6 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -89,8 +89,14 @@ public void testConvertToInteger_VII_9() { } @Test - public void testConvertToInteger_X_10() { - int integer = mNumerals.convertToInteger("X"); - assertEquals(10, integer); + public void testConvertToInteger_XX_20() { + int integer = mNumerals.convertToInteger("XX"); + assertEquals(20, integer); + } + + @Test + public void testConvertToInteger_XXX_30() { + int integer = mNumerals.convertToInteger("XXX"); + assertEquals(30, integer); } } From abd5f344c988d6a998e7f9b5b8f775d98a88def3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:36:15 +0300 Subject: [PATCH 032/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 36d7f39..5230b18 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -179,3 +179,9 @@ RefactoringAction 1475069747234 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475069749747 TestRomanNumerals.java RENAME testConvertToInteger_XX_20()/2=>void testConvertToInteger_XXX_20() METHOD RefactoringAction 1475069751259 TestRomanNumerals.java RENAME testConvertToInteger_XXX_20()=>void testConvertToInteger_XXX_30() METHOD EditAction 1475069755576 TestRomanNumerals.java 2225 16 31 15 +UnitTestCaseAction 1475069757331 TestRomanNumerals.java OK +UnitTestSessionAction 1475069757332 TestRomanNumerals.java OK +RefactoringAction 1475069760786 TestRomanNumerals.java ADD void testConvertToInteger_XXX_30()/2 METHOD +RefactoringAction 1475069764803 TestRomanNumerals.java RENAME testConvertToInteger_XXX_30()/2=>void testConvertToInteger_XL_30() METHOD +RefactoringAction 1475069767315 TestRomanNumerals.java RENAME testConvertToInteger_XL_30()=>void testConvertToInteger_XL_40() METHOD +EditAction 1475069775187 TestRomanNumerals.java 2359 17 33 16 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 9a882a6..0845b26 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -93,10 +93,16 @@ public void testConvertToInteger_XX_20() { int integer = mNumerals.convertToInteger("XX"); assertEquals(20, integer); } - + @Test public void testConvertToInteger_XXX_30() { int integer = mNumerals.convertToInteger("XXX"); assertEquals(30, integer); } + + @Test + public void testConvertToInteger_XL_40() { + int integer = mNumerals.convertToInteger("XL"); + assertEquals(40, integer); + } } From 1508dec43a4b85503cc03f4693ec89b718771093 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:36:34 +0300 Subject: [PATCH 033/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 5230b18..ebc1799 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -185,3 +185,9 @@ RefactoringAction 1475069760786 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475069764803 TestRomanNumerals.java RENAME testConvertToInteger_XXX_30()/2=>void testConvertToInteger_XL_30() METHOD RefactoringAction 1475069767315 TestRomanNumerals.java RENAME testConvertToInteger_XL_30()=>void testConvertToInteger_XL_40() METHOD EditAction 1475069775187 TestRomanNumerals.java 2359 17 33 16 +UnitTestCaseAction 1475069777138 TestRomanNumerals.java OK +UnitTestSessionAction 1475069777139 TestRomanNumerals.java OK +RefactoringAction 1475069781351 TestRomanNumerals.java ADD void testConvertToInteger_XL_40()/2 METHOD +RefactoringAction 1475069784361 TestRomanNumerals.java RENAME testConvertToInteger_XL_40()/2=>void testConvertToInteger_XL_50() METHOD +RefactoringAction 1475069785873 TestRomanNumerals.java RENAME testConvertToInteger_XL_50()=>void testConvertToInteger_XL_60() METHOD +EditAction 1475069794208 TestRomanNumerals.java 2493 18 35 17 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 0845b26..2f8e9b1 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -99,10 +99,16 @@ public void testConvertToInteger_XXX_30() { int integer = mNumerals.convertToInteger("XXX"); assertEquals(30, integer); } - + @Test public void testConvertToInteger_XL_40() { int integer = mNumerals.convertToInteger("XL"); assertEquals(40, integer); } + + @Test + public void testConvertToInteger_XL_60() { + int integer = mNumerals.convertToInteger("LX"); + assertEquals(60, integer); + } } From 85393dfd06691814d15769d542fef840072cdb80 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:37:27 +0300 Subject: [PATCH 034/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 13 +++++++++++++ tests/TestRomanNumerals.java | 22 ++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index ebc1799..dff7785 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -191,3 +191,16 @@ RefactoringAction 1475069781351 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475069784361 TestRomanNumerals.java RENAME testConvertToInteger_XL_40()/2=>void testConvertToInteger_XL_50() METHOD RefactoringAction 1475069785873 TestRomanNumerals.java RENAME testConvertToInteger_XL_50()=>void testConvertToInteger_XL_60() METHOD EditAction 1475069794208 TestRomanNumerals.java 2493 18 35 17 +UnitTestCaseAction 1475069796350 TestRomanNumerals.java OK +UnitTestSessionAction 1475069796351 TestRomanNumerals.java OK +RefactoringAction 1475069799397 TestRomanNumerals.java ADD void testConvertToInteger_XL_60()/2 METHOD +RefactoringAction 1475069808925 TestRomanNumerals.java RENAME testConvertToInteger_XL_60()/2=>void testConvertToInteger_LL_60() METHOD +RefactoringAction 1475069810937 TestRomanNumerals.java RENAME testConvertToInteger_LL_60()=>void testConvertToInteger_LX_60() METHOD +RefactoringAction 1475069814950 TestRomanNumerals.java RENAME testConvertToInteger_XL_60()=>void testConvertToInteger_LXX_60() METHOD +RefactoringAction 1475069817463 TestRomanNumerals.java RENAME testConvertToInteger_LXX_60()=>void testConvertToInteger_LXX_70() METHOD +RefactoringAction 1475069823489 TestRomanNumerals.java ADD void testConvertToInteger_LXX_70()/2 METHOD +RefactoringAction 1475069825502 TestRomanNumerals.java RENAME testConvertToInteger_LXX_70()/2=>void testConvertToInteger_LXXX_70() METHOD +RefactoringAction 1475069836042 TestRomanNumerals.java RENAME testConvertToInteger_LXXX_70()=>void testConvertToInteger_LXXX_80() METHOD +RefactoringAction 1475069837556 TestRomanNumerals.java ADD void testConvertToInteger_LXXX_80()/2 METHOD +RefactoringAction 1475069841067 TestRomanNumerals.java RENAME testConvertToInteger_LXXX_80()/2=>void testConvertToInteger_LXXX_90() METHOD +EditAction 1475069847522 TestRomanNumerals.java 2904 21 41 20 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2f8e9b1..11958fd 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -105,10 +105,28 @@ public void testConvertToInteger_XL_40() { int integer = mNumerals.convertToInteger("XL"); assertEquals(40, integer); } - + @Test - public void testConvertToInteger_XL_60() { + public void testConvertToInteger_LX_60() { int integer = mNumerals.convertToInteger("LX"); assertEquals(60, integer); } + + @Test + public void testConvertToInteger_LXX_70() { + int integer = mNumerals.convertToInteger("LXX"); + assertEquals(70, integer); + } + + @Test + public void testConvertToInteger_LXXX_80() { + int integer = mNumerals.convertToInteger("LXXX"); + assertEquals(80, integer); + } + + @Test + public void testConvertToInteger_LXXX_90() { + int integer = mNumerals.convertToInteger("XC"); + assertEquals(90, integer); + } } From 6525c6d5fe1d6aa17f420a7dac6496b6c3ac9e4d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:37:35 +0300 Subject: [PATCH 035/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 2 ++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index dff7785..154fedc 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -204,3 +204,5 @@ RefactoringAction 1475069836042 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475069837556 TestRomanNumerals.java ADD void testConvertToInteger_LXXX_80()/2 METHOD RefactoringAction 1475069841067 TestRomanNumerals.java RENAME testConvertToInteger_LXXX_80()/2=>void testConvertToInteger_LXXX_90() METHOD EditAction 1475069847522 TestRomanNumerals.java 2904 21 41 20 +RefactoringAction 1475069855099 TestRomanNumerals.java RENAME testConvertToInteger_LXXX_90()=>void testConvertToInteger_XC_90() METHOD +EditAction 1475069855273 TestRomanNumerals.java 2902 21 41 20 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 11958fd..7760e40 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -125,7 +125,7 @@ public void testConvertToInteger_LXXX_80() { } @Test - public void testConvertToInteger_LXXX_90() { + public void testConvertToInteger_XC_90() { int integer = mNumerals.convertToInteger("XC"); assertEquals(90, integer); } From 95be824d477655a88c773c2edb241028b0f8b3b6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:38:44 +0300 Subject: [PATCH 036/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 17 +++++++++++++++++ tests/TestRomanNumerals.java | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 154fedc..ec9b8f3 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -206,3 +206,20 @@ RefactoringAction 1475069841067 TestRomanNumerals.java RENAME testConvertToInteg EditAction 1475069847522 TestRomanNumerals.java 2904 21 41 20 RefactoringAction 1475069855099 TestRomanNumerals.java RENAME testConvertToInteger_LXXX_90()=>void testConvertToInteger_XC_90() METHOD EditAction 1475069855273 TestRomanNumerals.java 2902 21 41 20 +UnitTestCaseAction 1475069857191 TestRomanNumerals.java OK +UnitTestSessionAction 1475069857192 TestRomanNumerals.testConvertToInteger_XC_90 OK +UnitTestCaseAction 1475069861963 TestRomanNumerals.java OK +UnitTestSessionAction 1475069861965 TestRomanNumerals.java OK +RefactoringAction 1475069875611 TestRomanNumerals.java ADD void testConvertToInteger_XC_90()/2 METHOD +RefactoringAction 1475069880122 TestRomanNumerals.java RENAME testConvertToInteger_XC_90()/2=>void testConvertToInteger_CC_90() METHOD +RefactoringAction 1475069881628 TestRomanNumerals.java RENAME testConvertToInteger_CC_90()=>void testConvertToInteger_CC_200() METHOD +RefactoringAction 1475069888662 TestRomanNumerals.java ADD void testConvertToInteger_CC_200()/2 METHOD +RefactoringAction 1475069893685 TestRomanNumerals.java RENAME testConvertToInteger_CC_200()/2=>void testConvertToInteger_() METHOD +RefactoringAction 1475069895199 TestRomanNumerals.java RENAME testConvertToInteger_()=>void testConvertToInteger_300() METHOD +RefactoringAction 1475069896210 TestRomanNumerals.java RENAME testConvertToInteger_300()=>void testConvertToInteger_300_() METHOD +RefactoringAction 1475069897721 TestRomanNumerals.java RENAME testConvertToInteger_300_()=>void testConvertToInteger_300_CCC() METHOD +RefactoringAction 1475069904233 TestRomanNumerals.java RENAME testConvertToInteger_300_CCC()=>void testConvertToInteger_300() METHOD +RefactoringAction 1475069908246 TestRomanNumerals.java RENAME testConvertToInteger_300()=>void testConvertToInteger_CCC_300() METHOD +RefactoringAction 1475069914778 TestRomanNumerals.java ADD void testConvertToInteger_CCC_300()/2 METHOD +RefactoringAction 1475069916789 TestRomanNumerals.java RENAME testConvertToInteger_CCC_300()/2=>void testConvertToInteger_CCC_400() METHOD +EditAction 1475069924407 TestRomanNumerals.java 3315 24 47 23 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7760e40..fb77715 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -129,4 +129,22 @@ public void testConvertToInteger_XC_90() { int integer = mNumerals.convertToInteger("XC"); assertEquals(90, integer); } + + @Test + public void testConvertToInteger_CC_200() { + int integer = mNumerals.convertToInteger("CC"); + assertEquals(200, integer); + } + + @Test + public void testConvertToInteger_CCC_300() { + int integer = mNumerals.convertToInteger("CCC"); + assertEquals(300, integer); + } + + @Test + public void testConvertToInteger_CCC_400() { + int integer = mNumerals.convertToInteger("CD"); + assertEquals(400, integer); + } } From ebc5927ee9cb2f9f80760ef52dd82069073bab96 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:39:08 +0300 Subject: [PATCH 037/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index ec9b8f3..c794c53 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -223,3 +223,9 @@ RefactoringAction 1475069908246 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475069914778 TestRomanNumerals.java ADD void testConvertToInteger_CCC_300()/2 METHOD RefactoringAction 1475069916789 TestRomanNumerals.java RENAME testConvertToInteger_CCC_300()/2=>void testConvertToInteger_CCC_400() METHOD EditAction 1475069924407 TestRomanNumerals.java 3315 24 47 23 +UnitTestCaseAction 1475069927375 TestRomanNumerals.java OK +UnitTestSessionAction 1475069927376 TestRomanNumerals.java OK +RefactoringAction 1475069935318 TestRomanNumerals.java ADD void testConvertToInteger_CCC_400()/2 METHOD +RefactoringAction 1475069939830 TestRomanNumerals.java RENAME testConvertToInteger_CCC_400()/2=>void testConvertToInteger_DC_400() METHOD +RefactoringAction 1475069941345 TestRomanNumerals.java RENAME testConvertToInteger_DC_400()=>void testConvertToInteger_DC_600() METHOD +EditAction 1475069948391 TestRomanNumerals.java 3452 25 49 24 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index fb77715..b1666c3 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -147,4 +147,10 @@ public void testConvertToInteger_CCC_400() { int integer = mNumerals.convertToInteger("CD"); assertEquals(400, integer); } + + @Test + public void testConvertToInteger_DC_600() { + int integer = mNumerals.convertToInteger("CD"); + assertEquals(600, integer); + } } From e48a71e7b5501e76e8b6932550b2e7a0a9eca499 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:39:13 +0300 Subject: [PATCH 038/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index c794c53..aa41778 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -229,3 +229,6 @@ RefactoringAction 1475069935318 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475069939830 TestRomanNumerals.java RENAME testConvertToInteger_CCC_400()/2=>void testConvertToInteger_DC_400() METHOD RefactoringAction 1475069941345 TestRomanNumerals.java RENAME testConvertToInteger_DC_400()=>void testConvertToInteger_DC_600() METHOD EditAction 1475069948391 TestRomanNumerals.java 3452 25 49 24 +UnitTestCaseAction 1475069950337 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475069950338 TestRomanNumerals.java FAIL +EditAction 1475069953172 TestRomanNumerals.java 3452 25 49 24 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index b1666c3..88b0e37 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -150,7 +150,7 @@ public void testConvertToInteger_CCC_400() { @Test public void testConvertToInteger_DC_600() { - int integer = mNumerals.convertToInteger("CD"); + int integer = mNumerals.convertToInteger("DC"); assertEquals(600, integer); } } From f3eac15979f7f9e609032a76d065c73b91b42a46 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:39:57 +0300 Subject: [PATCH 039/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 11 +++++++++++ tests/TestRomanNumerals.java | 20 +++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index aa41778..2b98aab 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -232,3 +232,14 @@ EditAction 1475069948391 TestRomanNumerals.java 3452 25 49 24 UnitTestCaseAction 1475069950337 TestRomanNumerals.java FAIL UnitTestSessionAction 1475069950338 TestRomanNumerals.java FAIL EditAction 1475069953172 TestRomanNumerals.java 3452 25 49 24 +UnitTestCaseAction 1475069956456 TestRomanNumerals.java OK +UnitTestSessionAction 1475069956457 TestRomanNumerals.java OK +RefactoringAction 1475069959879 TestRomanNumerals.java ADD void testConvertToInteger_DC_600()/2 METHOD +RefactoringAction 1475069964414 TestRomanNumerals.java RENAME testConvertToInteger_DC_600()/2=>void testConvertToInteger_DC_700() METHOD +RefactoringAction 1475069968937 TestRomanNumerals.java ADD void testConvertToInteger_DC_700()/2 METHOD +RefactoringAction 1475069975469 TestRomanNumerals.java RENAME testConvertToInteger_DC_700()/2=>void testConvertToInteger_DCCC_700() METHOD +RefactoringAction 1475069976984 TestRomanNumerals.java RENAME testConvertToInteger_DC_700()=>void testConvertToInteger_DCC_700() METHOD +RefactoringAction 1475069981498 TestRomanNumerals.java RENAME testConvertToInteger_DCCC_700()=>void testConvertToInteger_DCCC_800() METHOD +RefactoringAction 1475069987013 TestRomanNumerals.java ADD void testConvertToInteger_DCCC_800()/2 METHOD +RefactoringAction 1475069993046 TestRomanNumerals.java RENAME testConvertToInteger_DCCC_800()/2=>void testConvertToInteger_DCCC_900() METHOD +EditAction 1475069996641 TestRomanNumerals.java 3869 28 55 27 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 88b0e37..061a505 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -147,10 +147,28 @@ public void testConvertToInteger_CCC_400() { int integer = mNumerals.convertToInteger("CD"); assertEquals(400, integer); } - + @Test public void testConvertToInteger_DC_600() { int integer = mNumerals.convertToInteger("DC"); assertEquals(600, integer); } + + @Test + public void testConvertToInteger_DCC_700() { + int integer = mNumerals.convertToInteger("DCC"); + assertEquals(700, integer); + } + + @Test + public void testConvertToInteger_DCCC_800() { + int integer = mNumerals.convertToInteger("DCCC"); + assertEquals(800, integer); + } + + @Test + public void testConvertToInteger_DCCC_900() { + int integer = mNumerals.convertToInteger("CM"); + assertEquals(900, integer); + } } From 29c9e77f22ff2042e3ff612fd991eff7a1d6fd17 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:40:02 +0300 Subject: [PATCH 040/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 2 ++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 2b98aab..1ab62b7 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -243,3 +243,5 @@ RefactoringAction 1475069981498 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475069987013 TestRomanNumerals.java ADD void testConvertToInteger_DCCC_800()/2 METHOD RefactoringAction 1475069993046 TestRomanNumerals.java RENAME testConvertToInteger_DCCC_800()/2=>void testConvertToInteger_DCCC_900() METHOD EditAction 1475069996641 TestRomanNumerals.java 3869 28 55 27 +RefactoringAction 1475070002071 TestRomanNumerals.java RENAME testConvertToInteger_DCCC_900()=>void testConvertToInteger_CM_900() METHOD +EditAction 1475070002096 TestRomanNumerals.java 3867 28 55 27 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 061a505..74e7fa3 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -167,7 +167,7 @@ public void testConvertToInteger_DCCC_800() { } @Test - public void testConvertToInteger_DCCC_900() { + public void testConvertToInteger_CM_900() { int integer = mNumerals.convertToInteger("CM"); assertEquals(900, integer); } From 7ff5c0942eefbe58ce42f7dbdff645489d3676c4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:40:39 +0300 Subject: [PATCH 041/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 11 +++++++++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 1ab62b7..744e85f 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -245,3 +245,14 @@ RefactoringAction 1475069993046 TestRomanNumerals.java RENAME testConvertToInteg EditAction 1475069996641 TestRomanNumerals.java 3869 28 55 27 RefactoringAction 1475070002071 TestRomanNumerals.java RENAME testConvertToInteger_DCCC_900()=>void testConvertToInteger_CM_900() METHOD EditAction 1475070002096 TestRomanNumerals.java 3867 28 55 27 +UnitTestCaseAction 1475070004012 TestRomanNumerals.java OK +UnitTestSessionAction 1475070004013 TestRomanNumerals.testConvertToInteger_CM_900 OK +UnitTestCaseAction 1475070008679 TestRomanNumerals.java OK +UnitTestSessionAction 1475070008681 TestRomanNumerals.java OK +RefactoringAction 1475070017090 TestRomanNumerals.java ADD void testConvertToInteger_CM_900()/2 METHOD +RefactoringAction 1475070024116 TestRomanNumerals.java RENAME testConvertToInteger_CM_900()/2=>void testConvertToInteger_MCMLXXX_900() METHOD +RefactoringAction 1475070026129 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXX_900()=>void testConvertToInteger_MCMLXXXIV_900() METHOD +RefactoringAction 1475070027643 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_900()=>void testConvertToInteger_MCMLXXXIV_() METHOD +RefactoringAction 1475070029657 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_()=>void testConvertToInteger_MCMLXXXIV_19() METHOD +RefactoringAction 1475070031170 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_19()=>void testConvertToInteger_MCMLXXXIV_1984() METHOD +EditAction 1475070039578 TestRomanNumerals.java 4019 29 57 28 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 74e7fa3..c71bb00 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -165,6 +165,12 @@ public void testConvertToInteger_DCCC_800() { int integer = mNumerals.convertToInteger("DCCC"); assertEquals(800, integer); } + + @Test + public void testConvertToInteger_MCMLXXXIV_1984() { + int integer = mNumerals.convertToInteger("MCMLXXXIV"); + assertEquals(1984, integer); + } @Test public void testConvertToInteger_CM_900() { From 9be9b7a9281776128064784e6ba03b53e57347e6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:41:17 +0300 Subject: [PATCH 042/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 9 +++++++++ tests/TestRomanNumerals.java | 13 ++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 744e85f..9c18089 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -256,3 +256,12 @@ RefactoringAction 1475070027643 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475070029657 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_()=>void testConvertToInteger_MCMLXXXIV_19() METHOD RefactoringAction 1475070031170 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_19()=>void testConvertToInteger_MCMLXXXIV_1984() METHOD EditAction 1475070039578 TestRomanNumerals.java 4019 29 57 28 +UnitTestCaseAction 1475070044727 TestRomanNumerals.java OK +UnitTestSessionAction 1475070044728 TestRomanNumerals.java OK +RefactoringAction 1475070053703 TestRomanNumerals.java REMOVE testConvertToInteger_MCMLXXXIV_1984() METHOD +RefactoringAction 1475070055217 TestRomanNumerals.java ADD void testConvertToInteger_MCMLXXXIV_1984() METHOD +RefactoringAction 1475070057230 TestRomanNumerals.java ADD void testConvertToInteger_MCMLXXXIV_1984()/2 METHOD +RefactoringAction 1475070063267 TestRomanNumerals.java RENAME testConvertToInteger_MCMLXXXIV_1984()/2=>void testConvertToInteger__1984() METHOD +RefactoringAction 1475070065776 TestRomanNumerals.java RENAME testConvertToInteger__1984()=>void testConvertToInteger_MMXIV_1984() METHOD +RefactoringAction 1475070068287 TestRomanNumerals.java RENAME testConvertToInteger_MMXIV_1984()=>void testConvertToInteger_MMXIV_2014() METHOD +EditAction 1475070076797 TestRomanNumerals.java 4166 30 59 29 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c71bb00..c75aeee 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -166,6 +166,12 @@ public void testConvertToInteger_DCCC_800() { assertEquals(800, integer); } + @Test + public void testConvertToInteger_CM_900() { + int integer = mNumerals.convertToInteger("CM"); + assertEquals(900, integer); + } + @Test public void testConvertToInteger_MCMLXXXIV_1984() { int integer = mNumerals.convertToInteger("MCMLXXXIV"); @@ -173,8 +179,9 @@ public void testConvertToInteger_MCMLXXXIV_1984() { } @Test - public void testConvertToInteger_CM_900() { - int integer = mNumerals.convertToInteger("CM"); - assertEquals(900, integer); + public void testConvertToInteger_MMXIV_2014() { + int integer = mNumerals.convertToInteger("MMXIV"); + assertEquals(2014, integer); } + } From 12a01e0f78e27a0de335ca5b9fbbc14dea67a89c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:41:26 +0300 Subject: [PATCH 043/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ tests/TestRomanNumerals.java | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 9c18089..7245a7e 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -265,3 +265,6 @@ RefactoringAction 1475070063267 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475070065776 TestRomanNumerals.java RENAME testConvertToInteger__1984()=>void testConvertToInteger_MMXIV_1984() METHOD RefactoringAction 1475070068287 TestRomanNumerals.java RENAME testConvertToInteger_MMXIV_1984()=>void testConvertToInteger_MMXIV_2014() METHOD EditAction 1475070076797 TestRomanNumerals.java 4166 30 59 29 +UnitTestCaseAction 1475070079644 TestRomanNumerals.java OK +UnitTestSessionAction 1475070079645 TestRomanNumerals.java OK +EditAction 1475070086210 TestRomanNumerals.java 4164 30 59 29 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c75aeee..2563195 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -183,5 +183,4 @@ public void testConvertToInteger_MMXIV_2014() { int integer = mNumerals.convertToInteger("MMXIV"); assertEquals(2014, integer); } - } From 7837d90be1a17d99f1af30f9d47495cb0a3b9bd8 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:42:38 +0300 Subject: [PATCH 044/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 4 ++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 7245a7e..529c595 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -268,3 +268,7 @@ EditAction 1475070076797 TestRomanNumerals.java 4166 30 59 29 UnitTestCaseAction 1475070079644 TestRomanNumerals.java OK UnitTestSessionAction 1475070079645 TestRomanNumerals.java OK EditAction 1475070086210 TestRomanNumerals.java 4164 30 59 29 +RefactoringAction 1475070148331 TestRomanNumerals.java ADD void testConvertToInteger_VII_7()/2 METHOD +RefactoringAction 1475070151857 TestRomanNumerals.java RENAME testConvertToInteger_VII_7()/2=>void testConvertToInteger_VI_7() METHOD +RefactoringAction 1475070153883 TestRomanNumerals.java RENAME testConvertToInteger_VI_7()=>void testConvertToInteger_VI_6() METHOD +EditAction 1475070158184 TestRomanNumerals.java 4297 31 61 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2563195..22a3c1b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -70,6 +70,12 @@ public void testConvertToInteger_IV_4() { assertEquals(4, integer); } + @Test + public void testConvertToInteger_VI_6() { + int integer = mNumerals.convertToInteger("VI"); + assertEquals(6, integer); + } + @Test public void testConvertToInteger_VII_7() { int integer = mNumerals.convertToInteger("VII"); From 65c46b9551afe0afff175cbac0c0c77f6b062937 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:45:13 +0300 Subject: [PATCH 045/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 529c595..eba9828 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -272,3 +272,8 @@ RefactoringAction 1475070148331 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475070151857 TestRomanNumerals.java RENAME testConvertToInteger_VII_7()/2=>void testConvertToInteger_VI_7() METHOD RefactoringAction 1475070153883 TestRomanNumerals.java RENAME testConvertToInteger_VI_7()=>void testConvertToInteger_VI_6() METHOD EditAction 1475070158184 TestRomanNumerals.java 4297 31 61 30 +UnitTestCaseAction 1475070161215 TestRomanNumerals.java OK +UnitTestSessionAction 1475070161216 TestRomanNumerals.java OK +UnitTestCaseAction 1475070173353 TestRomanNumerals.java OK +UnitTestSessionAction 1475070173354 TestRomanNumerals.java OK +EditAction 1475070313257 TestRomanNumerals.java 4298 31 61 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 22a3c1b..8bbd8cd 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -85,7 +85,7 @@ public void testConvertToInteger_VII_7() { @Test public void testConvertToInteger_VII_8() { int integer = mNumerals.convertToInteger("VIII"); - assertEquals(8, integer); + assertEquals(81, integer); } @Test From 8811177964e5039571df41ec369a6f318d063bf3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:45:16 +0300 Subject: [PATCH 046/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + src/RomanNumerals.java | 1 + 2 files changed, 2 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index eba9828..34088ef 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -277,3 +277,4 @@ UnitTestSessionAction 1475070161216 TestRomanNumerals.java OK UnitTestCaseAction 1475070173353 TestRomanNumerals.java OK UnitTestSessionAction 1475070173354 TestRomanNumerals.java OK EditAction 1475070313257 TestRomanNumerals.java 4298 31 61 30 +EditAction 1475070315835 RomanNumerals.java 981 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 3f7f41b..c4d7fc6 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,6 +4,7 @@ public int convertToInteger(String romanNum) { int retValue = 0; int lastSub = 0; + for (int i = 0; i < romanNum.length(); i++) { if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && From 1c082c86e44e7e29d7c6f442145a92215f52f75f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:45:20 +0300 Subject: [PATCH 047/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 34088ef..5d239a3 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -278,3 +278,6 @@ UnitTestCaseAction 1475070173353 TestRomanNumerals.java OK UnitTestSessionAction 1475070173354 TestRomanNumerals.java OK EditAction 1475070313257 TestRomanNumerals.java 4298 31 61 30 EditAction 1475070315835 RomanNumerals.java 981 3 7 0 +UnitTestCaseAction 1475070318801 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475070318802 TestRomanNumerals.java FAIL +EditAction 1475070320462 TestRomanNumerals.java 4297 31 61 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 8bbd8cd..22a3c1b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -85,7 +85,7 @@ public void testConvertToInteger_VII_7() { @Test public void testConvertToInteger_VII_8() { int integer = mNumerals.convertToInteger("VIII"); - assertEquals(81, integer); + assertEquals(8, integer); } @Test From 8041a3ff75cca5dbf0283c1323e230de664dc0b5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:45:38 +0300 Subject: [PATCH 048/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 5d239a3..eb437b1 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -281,3 +281,6 @@ EditAction 1475070315835 RomanNumerals.java 981 3 7 0 UnitTestCaseAction 1475070318801 TestRomanNumerals.java FAIL UnitTestSessionAction 1475070318802 TestRomanNumerals.java FAIL EditAction 1475070320462 TestRomanNumerals.java 4297 31 61 30 +UnitTestCaseAction 1475070322314 TestRomanNumerals.java OK +UnitTestSessionAction 1475070322315 TestRomanNumerals.java OK +EditAction 1475070338530 TestRomanNumerals.java 4296 31 61 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 22a3c1b..bb85a41 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -84,7 +84,7 @@ public void testConvertToInteger_VII_7() { @Test public void testConvertToInteger_VII_8() { - int integer = mNumerals.convertToInteger("VIII"); + int integer = mNumerals.convertToInteger("VII"); assertEquals(8, integer); } From 488e46cddc24be9610cffbd8b9665c9819937576 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:46:06 +0300 Subject: [PATCH 049/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index eb437b1..f689144 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -284,3 +284,8 @@ EditAction 1475070320462 TestRomanNumerals.java 4297 31 61 30 UnitTestCaseAction 1475070322314 TestRomanNumerals.java OK UnitTestSessionAction 1475070322315 TestRomanNumerals.java OK EditAction 1475070338530 TestRomanNumerals.java 4296 31 61 30 +RefactoringAction 1475070342462 TestRomanNumerals.java RENAME testConvertToInteger_VII_8()=>void testConvertToInteger_VIII_8() METHOD +RefactoringAction 1475070348476 TestRomanNumerals.java RENAME testConvertToInteger_VII_9()=>void testConvertToInteger_IX_9() METHOD +RefactoringAction 1475070361443 RomanNumerals.java RENAME convertToInteger(String)=>int CD(String) METHOD +RefactoringAction 1475070363493 TestRomanNumerals.java RENAME testConvertToInteger_CCC_400()=>void testConvertToInteger_CD_400() METHOD +EditAction 1475070365875 TestRomanNumerals.java 4296 31 61 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index bb85a41..f8e1b1a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -83,13 +83,13 @@ public void testConvertToInteger_VII_7() { } @Test - public void testConvertToInteger_VII_8() { - int integer = mNumerals.convertToInteger("VII"); + public void testConvertToInteger_VIII_8() { + int integer = mNumerals.convertToInteger("VIII"); assertEquals(8, integer); } @Test - public void testConvertToInteger_VII_9() { + public void testConvertToInteger_IX_9() { int integer = mNumerals.convertToInteger("IX"); assertEquals(9, integer); } @@ -149,7 +149,7 @@ public void testConvertToInteger_CCC_300() { } @Test - public void testConvertToInteger_CCC_400() { + public void testConvertToInteger_CD_400() { int integer = mNumerals.convertToInteger("CD"); assertEquals(400, integer); } From 4801ea5a766533522b5d242b19125baf0f90aaab Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:46:19 +0300 Subject: [PATCH 050/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index f689144..4686a4d 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -289,3 +289,4 @@ RefactoringAction 1475070348476 TestRomanNumerals.java RENAME testConvertToInteg RefactoringAction 1475070361443 RomanNumerals.java RENAME convertToInteger(String)=>int CD(String) METHOD RefactoringAction 1475070363493 TestRomanNumerals.java RENAME testConvertToInteger_CCC_400()=>void testConvertToInteger_CD_400() METHOD EditAction 1475070365875 TestRomanNumerals.java 4296 31 61 30 +EditAction 1475070378861 RomanNumerals.java 967 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index c4d7fc6..4733942 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,6 @@ public class RomanNumerals { - public int convertToInteger(String romanNum) { + public int CD(String romanNum) { int retValue = 0; int lastSub = 0; From 955607fa1de101d4303bd27a65bbf49eb7a838dc Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:46:48 +0300 Subject: [PATCH 051/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 10 ++++++++++ src/RomanNumerals.java | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 4686a4d..720124f 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -290,3 +290,13 @@ RefactoringAction 1475070361443 RomanNumerals.java RENAME convertToInteger(Strin RefactoringAction 1475070363493 TestRomanNumerals.java RENAME testConvertToInteger_CCC_400()=>void testConvertToInteger_CD_400() METHOD EditAction 1475070365875 TestRomanNumerals.java 4296 31 61 30 EditAction 1475070378861 RomanNumerals.java 967 3 7 0 +CompilationAction 1475070380071 TestRomanNumerals.java +RefactoringAction 1475070386025 TestRomanNumerals.java ADD void testConvertToInteger_II_9() METHOD +RefactoringAction 1475070386027 TestRomanNumerals.java ADD void testConvertToInteger_CCC_400() METHOD +RefactoringAction 1475070388041 TestRomanNumerals.java ADD void testConvertToInteger_VII_8() METHOD +RefactoringAction 1475070388043 TestRomanNumerals.java ADD void testConvertToInteger_VII_9() METHOD +RefactoringAction 1475070395572 TestRomanNumerals.java ADD void testConvertToInteger_VIII_8() METHOD +RefactoringAction 1475070395576 TestRomanNumerals.java ADD void testConvertToInteger_IX_9() METHOD +RefactoringAction 1475070395578 TestRomanNumerals.java ADD void testConvertToInteger_CD_400() METHOD +RefactoringAction 1475070407462 RomanNumerals.java RENAME CD(String)=>int convertToInteger(String) METHOD +EditAction 1475070408271 RomanNumerals.java 981 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4733942..c4d7fc6 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,6 @@ public class RomanNumerals { - public int CD(String romanNum) { + public int convertToInteger(String romanNum) { int retValue = 0; int lastSub = 0; From c9250976069dfccd620d49d2c7f9f09989ea84f6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 16:48:01 +0300 Subject: [PATCH 052/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 3 +++ src/RomanNumerals.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 720124f..5825cca 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -300,3 +300,6 @@ RefactoringAction 1475070395576 TestRomanNumerals.java ADD void testConvertToInt RefactoringAction 1475070395578 TestRomanNumerals.java ADD void testConvertToInteger_CD_400() METHOD RefactoringAction 1475070407462 RomanNumerals.java RENAME CD(String)=>int convertToInteger(String) METHOD EditAction 1475070408271 RomanNumerals.java 981 3 7 0 +UnitTestCaseAction 1475070440330 TestRomanNumerals.java OK +UnitTestSessionAction 1475070440331 TestRomanNumerals.java OK +EditAction 1475070481316 RomanNumerals.java 1032 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index c4d7fc6..09109cb 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -17,6 +17,8 @@ public int convertToInteger(String romanNum) { } } + // TODO characters repeating (tests first...) + return retValue; } From 3df437c0afa3dc0bc8016345d7a25a9744689836 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:08:58 +0300 Subject: [PATCH 053/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ .besouro/20160928170751466/besouroEpisodes.txt | 0 .besouro/20160928170751466/disagreements.txt | 0 .besouro/20160928170751466/randomHeuristicEpisodes.txt | 0 .besouro/20160928170751466/userComments.txt | 0 .besouro/20160928170751466/zorroEpisodes.txt | 0 src/RomanNumerals.java | 2 +- 7 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .besouro/20160928170751466/actions.txt create mode 100644 .besouro/20160928170751466/besouroEpisodes.txt create mode 100644 .besouro/20160928170751466/disagreements.txt create mode 100644 .besouro/20160928170751466/randomHeuristicEpisodes.txt create mode 100644 .besouro/20160928170751466/userComments.txt create mode 100644 .besouro/20160928170751466/zorroEpisodes.txt diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt new file mode 100644 index 0000000..9357f3a --- /dev/null +++ b/.besouro/20160928170751466/actions.txt @@ -0,0 +1,3 @@ +FileOpenedAction 1475071671581 TestRomanNumerals.java 4296 31 61 30 +FileOpenedAction 1475071674770 RomanNumerals.java 1032 3 7 0 +EditAction 1475071738122 RomanNumerals.java 1085 3 7 0 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928170751466/disagreements.txt b/.besouro/20160928170751466/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928170751466/userComments.txt b/.besouro/20160928170751466/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 09109cb..4966128 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -42,7 +42,7 @@ private int getElementaryValue(char character) { case 'C': return 100; case 'D': return 500; case 'M': return 1000; - default: return 0; + default: throw new NumberFormatException("Invalid numberal chatacter"); } } } From 8a6e8c56e4b60058523347ef3d65c63086fa2e24 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:11:12 +0300 Subject: [PATCH 054/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ tests/TestRomanNumerals.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 9357f3a..4188f95 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -1,3 +1,7 @@ FileOpenedAction 1475071671581 TestRomanNumerals.java 4296 31 61 30 FileOpenedAction 1475071674770 RomanNumerals.java 1032 3 7 0 EditAction 1475071738122 RomanNumerals.java 1085 3 7 0 +RefactoringAction 1475071767188 TestRomanNumerals.java ADD void test FIELD +RefactoringAction 1475071770750 TestRomanNumerals.java REMOVE test FIELD +RefactoringAction 1475071793541 TestRomanNumerals.java ADD void testConvertInteger_InvalidFormat() METHOD +EditAction 1475071872518 TestRomanNumerals.java 4432 32 62 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f8e1b1a..c4d7787 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -10,6 +10,11 @@ public class TestRomanNumerals { public void initialize() { mNumerals = new RomanNumerals(); } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_InvalidFormat() { + mNumerals.convertToInteger("IO"); + } @Test public void testConvertToInteger_I_1() { From 1486607551ad01e329414ad57434af581a5ece1d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:11:19 +0300 Subject: [PATCH 055/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 4188f95..ddc8c77 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -5,3 +5,4 @@ RefactoringAction 1475071767188 TestRomanNumerals.java ADD void test FIELD RefactoringAction 1475071770750 TestRomanNumerals.java REMOVE test FIELD RefactoringAction 1475071793541 TestRomanNumerals.java ADD void testConvertInteger_InvalidFormat() METHOD EditAction 1475071872518 TestRomanNumerals.java 4432 32 62 30 +EditAction 1475071879051 RomanNumerals.java 1025 3 6 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4966128..2036413 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -42,7 +42,7 @@ private int getElementaryValue(char character) { case 'C': return 100; case 'D': return 500; case 'M': return 1000; - default: throw new NumberFormatException("Invalid numberal chatacter"); + default: 0; } } } From b0cec0316a1d482214d66817af7bd02d69c8afe8 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:12:04 +0300 Subject: [PATCH 056/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 7 +++++++ src/RomanNumerals.java | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index ddc8c77..eba2b33 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -6,3 +6,10 @@ RefactoringAction 1475071770750 TestRomanNumerals.java REMOVE test FIELD RefactoringAction 1475071793541 TestRomanNumerals.java ADD void testConvertInteger_InvalidFormat() METHOD EditAction 1475071872518 TestRomanNumerals.java 4432 32 62 30 EditAction 1475071879051 RomanNumerals.java 1025 3 6 0 +CompilationAction 1475071879269 RomanNumerals.java +CompilationAction 1475071879269 RomanNumerals.java +CompilationAction 1475071888532 RomanNumerals.java +CompilationAction 1475071888532 RomanNumerals.java +UnitTestCaseAction 1475071890477 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475071890478 TestRomanNumerals.java FAIL +EditAction 1475071924743 RomanNumerals.java 1086 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 2036413..dbccae0 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -42,7 +42,8 @@ private int getElementaryValue(char character) { case 'C': return 100; case 'D': return 500; case 'M': return 1000; - default: 0; + default: + throw new NumberFormatException("Invalid number character"); } } } From 1a0e5a243893804843d048cce420cc07b13265f6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:16:47 +0300 Subject: [PATCH 057/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 13 +++++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .../20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 9 +++++++-- 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index eba2b33..22ca10e 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -13,3 +13,16 @@ CompilationAction 1475071888532 RomanNumerals.java UnitTestCaseAction 1475071890477 TestRomanNumerals.java FAIL UnitTestSessionAction 1475071890478 TestRomanNumerals.java FAIL EditAction 1475071924743 RomanNumerals.java 1086 3 7 0 +UnitTestCaseAction 1475071927154 TestRomanNumerals.java OK +UnitTestSessionAction 1475071927155 TestRomanNumerals.java OK +RefactoringAction 1475071937918 TestRomanNumerals.java ADD void testConvertInteger_InvalidFormat()/2 METHOD +RefactoringAction 1475071951492 TestRomanNumerals.java RENAME testConvertInteger_InvalidFormat()/2=>void testConvertInteger_NumberFormatException() METHOD +RefactoringAction 1475071953516 TestRomanNumerals.java RENAME testConvertInteger_NumberFormatException()=>void testConvertInteger_ThrowNumberFormatException() METHOD +RefactoringAction 1475071954548 TestRomanNumerals.java RENAME testConvertInteger_ThrowNumberFormatException()=>void testConvertInteger_Throw_NumberFormatException() METHOD +RefactoringAction 1475071957593 TestRomanNumerals.java RENAME testConvertInteger_InvalidFormat()=>void testConvertInteger_Throw_InvalidFormat() METHOD +RefactoringAction 1475071958613 TestRomanNumerals.java RENAME testConvertInteger_Throw_InvalidFormat()=>void testConvertInteger_Throw_NumberFormatExceptionFormat() METHOD +RefactoringAction 1475071959635 TestRomanNumerals.java RENAME testConvertInteger_Throw_NumberFormatExceptionFormat()=>void testConvertInteger_Throw_Format() METHOD +RefactoringAction 1475071961667 TestRomanNumerals.java RENAME testConvertInteger_Throw_Format()=>void testConvertInteger_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475071965690 TestRomanNumerals.java RENAME testConvertInteger_Throw_NumberFormatException()/2=>void testConvertInteger__Throw_NumberFormatException() METHOD +RefactoringAction 1475071969221 TestRomanNumerals.java RENAME testConvertInteger__Throw_NumberFormatException()=>void testConvertInteger_ThreeX_Throw_NumberFormatException() METHOD +EditAction 1475072207581 TestRomanNumerals.java 4603 33 63 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index e69de29..f7c9f1b 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -0,0 +1,2 @@ +1475071927155 test-first 3 255 true +1475071927156 test-last 1 255 false diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index e69de29..1b57088 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475071927155 test-first 3 255 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index e69de29..1b57088 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -0,0 +1 @@ +1475071927155 test-first 3 255 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c4d7787..b0f5abc 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -10,11 +10,16 @@ public class TestRomanNumerals { public void initialize() { mNumerals = new RomanNumerals(); } - + @Test(expected=NumberFormatException.class) - public void testConvertInteger_InvalidFormat() { + public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_ThreeX_Throw_NumberFormatException() { + mNumerals.convertToInteger("XXX"); + } @Test public void testConvertToInteger_I_1() { From 96aafd48fb024a857d390abfc26ed18131a08e40 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:17:09 +0300 Subject: [PATCH 058/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 2 ++ tests/TestRomanNumerals.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 22ca10e..14c0685 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -26,3 +26,5 @@ RefactoringAction 1475071961667 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475071965690 TestRomanNumerals.java RENAME testConvertInteger_Throw_NumberFormatException()/2=>void testConvertInteger__Throw_NumberFormatException() METHOD RefactoringAction 1475071969221 TestRomanNumerals.java RENAME testConvertInteger__Throw_NumberFormatException()=>void testConvertInteger_ThreeX_Throw_NumberFormatException() METHOD EditAction 1475072207581 TestRomanNumerals.java 4603 33 63 30 +RefactoringAction 1475072226317 TestRomanNumerals.java RENAME testConvertInteger_ThreeX_Throw_NumberFormatException()=>void testConvertInteger_FourX_Throw_NumberFormatException() METHOD +EditAction 1475072229199 TestRomanNumerals.java 4603 33 63 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index b0f5abc..c24c4f5 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -17,8 +17,8 @@ public void testConvertInteger_Throw_NumberFormatException() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_ThreeX_Throw_NumberFormatException() { - mNumerals.convertToInteger("XXX"); + public void testConvertInteger_FourX_Throw_NumberFormatException() { + mNumerals.convertToInteger("XXXX"); } @Test From eb25a8d6748dc58ac60fdbeadce9ef7416c53344 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:20:37 +0300 Subject: [PATCH 059/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ src/RomanNumerals.java | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 14c0685..922753c 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -28,3 +28,8 @@ RefactoringAction 1475071969221 TestRomanNumerals.java RENAME testConvertInteger EditAction 1475072207581 TestRomanNumerals.java 4603 33 63 30 RefactoringAction 1475072226317 TestRomanNumerals.java RENAME testConvertInteger_ThreeX_Throw_NumberFormatException()=>void testConvertInteger_FourX_Throw_NumberFormatException() METHOD EditAction 1475072229199 TestRomanNumerals.java 4603 33 63 30 +UnitTestCaseAction 1475072230359 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072230359 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475072415909 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072415928 TestRomanNumerals.java FAIL +EditAction 1475072437286 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index dbccae0..f6c2403 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -5,7 +5,21 @@ public int convertToInteger(String romanNum) { int lastSub = 0; + int duplicates = 0; + for (int i = 0; i < romanNum.length(); i++) { + if (i > 1) { + if (romanNum.charAt(i - 1) == romanNum.charAt(i)) { + ++duplicates; + } else { + duplicates = 0; + } + } + + if (duplicates > 3 && romanNum.charAt(i) == 'X') { + throw new NumberFormatException("Too many duplicate numeral character"); + } + if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { @@ -43,7 +57,7 @@ private int getElementaryValue(char character) { case 'D': return 500; case 'M': return 1000; default: - throw new NumberFormatException("Invalid number character"); + throw new NumberFormatException("Invalid numeral character"); } } } From 1a9da5ba335d57d04d1f256f44a0c3e41ea97fc1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:20:53 +0300 Subject: [PATCH 060/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 922753c..8918637 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -33,3 +33,6 @@ UnitTestSessionAction 1475072230359 TestRomanNumerals.java FAIL UnitTestCaseAction 1475072415909 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072415928 TestRomanNumerals.java FAIL EditAction 1475072437286 RomanNumerals.java 1392 3 8 0 +UnitTestCaseAction 1475072440475 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072440476 TestRomanNumerals.java FAIL +EditAction 1475072453034 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f6c2403..11a4c90 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates > 3 && romanNum.charAt(i) == 'X') { + if (duplicates > 2 && romanNum.charAt(i) == 'X') { throw new NumberFormatException("Too many duplicate numeral character"); } From 93ed7983b7f93351a6d3e358edf7dcd7f9f9861f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:23:43 +0300 Subject: [PATCH 061/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 9 +++++++++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 8918637..1a026f6 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -36,3 +36,12 @@ EditAction 1475072437286 RomanNumerals.java 1392 3 8 0 UnitTestCaseAction 1475072440475 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072440476 TestRomanNumerals.java FAIL EditAction 1475072453034 RomanNumerals.java 1392 3 8 0 +UnitTestCaseAction 1475072455283 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072455283 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475072598057 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072598057 TestRomanNumerals.java FAIL +RefactoringAction 1475072609466 TestRomanNumerals.java RENAME testConvertInteger_FourX_Throw_NumberFormatException()=>void testConvertInteger_Four_X_Throw_NumberFormatException() METHOD +RefactoringAction 1475072616483 TestRomanNumerals.java RENAME testConvertInteger_Four_X_Throw_NumberFormatException()=>void testConvertIntegerFour_X_Throw_NumberFormatException() METHOD +RefactoringAction 1475072618501 TestRomanNumerals.java RENAME testConvertIntegerFour_X_Throw_NumberFormatException()=>void testConvertIntegerFourXs_Throw_NumberFormatException() METHOD +RefactoringAction 1475072622024 TestRomanNumerals.java RENAME testConvertIntegerFourXs_Throw_NumberFormatException()=>void testConvertIntegerFourX_Throw_NumberFormatException() METHOD +EditAction 1475072623417 TestRomanNumerals.java 4602 33 63 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c24c4f5..7b405f6 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -17,7 +17,7 @@ public void testConvertInteger_Throw_NumberFormatException() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_FourX_Throw_NumberFormatException() { + public void testConvertIntegerFourX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); } From 44c7382b568289d1c5400b4f801471a9d246610f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:24:02 +0300 Subject: [PATCH 062/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 1a026f6..de1bebc 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -45,3 +45,4 @@ RefactoringAction 1475072616483 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475072618501 TestRomanNumerals.java RENAME testConvertIntegerFour_X_Throw_NumberFormatException()=>void testConvertIntegerFourXs_Throw_NumberFormatException() METHOD RefactoringAction 1475072622024 TestRomanNumerals.java RENAME testConvertIntegerFourXs_Throw_NumberFormatException()=>void testConvertIntegerFourX_Throw_NumberFormatException() METHOD EditAction 1475072623417 TestRomanNumerals.java 4602 33 63 30 +EditAction 1475072642561 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 11a4c90..1c167e2 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates > 2 && romanNum.charAt(i) == 'X') { + if (duplicates > 1 && romanNum.charAt(i) == 'X') { throw new NumberFormatException("Too many duplicate numeral character"); } From 2143051a09172a449ea14aebdc34d2a63831972d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:24:08 +0300 Subject: [PATCH 063/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 2 +- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index de1bebc..721310f 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -46,3 +46,6 @@ RefactoringAction 1475072618501 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475072622024 TestRomanNumerals.java RENAME testConvertIntegerFourXs_Throw_NumberFormatException()=>void testConvertIntegerFourX_Throw_NumberFormatException() METHOD EditAction 1475072623417 TestRomanNumerals.java 4602 33 63 30 EditAction 1475072642561 RomanNumerals.java 1392 3 8 0 +UnitTestCaseAction 1475072644071 TestRomanNumerals.java OK +UnitTestSessionAction 1475072644071 TestRomanNumerals.testConvertIntegerFourX_Throw_NumberFormatException OK +EditAction 1475072648612 TestRomanNumerals.java 4601 33 63 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index f7c9f1b..4990f4d 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -1,2 +1,4 @@ 1475071927155 test-first 3 255 true 1475071927156 test-last 1 255 false +1475072644071 test-first 3 706 true +1475072644072 test-first 3 706 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 1b57088..ce1203e 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -1 +1,2 @@ 1475071927155 test-first 3 255 true +1475072644071 test-first 3 706 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 1b57088..6538f88 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -1 +1,2 @@ 1475071927155 test-first 3 255 true +1475072644071 test-first 3 716 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7b405f6..c0e92fb 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,7 +18,7 @@ public void testConvertInteger_Throw_NumberFormatException() { @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { - mNumerals.convertToInteger("XXXX"); + mNumerals.convertToInteger("XXX"); } @Test From f170eeaec3e38594a183be0f6bd419b115eb4ab0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:24:13 +0300 Subject: [PATCH 064/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 721310f..762fc34 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -49,3 +49,6 @@ EditAction 1475072642561 RomanNumerals.java 1392 3 8 0 UnitTestCaseAction 1475072644071 TestRomanNumerals.java OK UnitTestSessionAction 1475072644071 TestRomanNumerals.testConvertIntegerFourX_Throw_NumberFormatException OK EditAction 1475072648612 TestRomanNumerals.java 4601 33 63 30 +UnitTestCaseAction 1475072650054 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072650054 TestRomanNumerals.java FAIL +EditAction 1475072653197 TestRomanNumerals.java 4602 33 63 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index c0e92fb..7b405f6 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,7 +18,7 @@ public void testConvertInteger_Throw_NumberFormatException() { @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { - mNumerals.convertToInteger("XXX"); + mNumerals.convertToInteger("XXXX"); } @Test From 795b767c8416e6e6cf159576537f35f55ef05fbd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:24:41 +0300 Subject: [PATCH 065/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 762fc34..188ec24 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -52,3 +52,6 @@ EditAction 1475072648612 TestRomanNumerals.java 4601 33 63 30 UnitTestCaseAction 1475072650054 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072650054 TestRomanNumerals.java FAIL EditAction 1475072653197 TestRomanNumerals.java 4602 33 63 30 +UnitTestCaseAction 1475072658012 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072658013 TestRomanNumerals.java FAIL +EditAction 1475072681527 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1c167e2..f6c2403 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates > 1 && romanNum.charAt(i) == 'X') { + if (duplicates > 3 && romanNum.charAt(i) == 'X') { throw new NumberFormatException("Too many duplicate numeral character"); } From 2f4551609178514131aebbb1fce43dcecdcf3caf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:27:33 +0300 Subject: [PATCH 066/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 188ec24..c89b313 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -55,3 +55,4 @@ EditAction 1475072653197 TestRomanNumerals.java 4602 33 63 30 UnitTestCaseAction 1475072658012 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072658013 TestRomanNumerals.java FAIL EditAction 1475072681527 RomanNumerals.java 1392 3 8 0 +EditAction 1475072853690 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f6c2403..11a4c90 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates > 3 && romanNum.charAt(i) == 'X') { + if (duplicates > 2 && romanNum.charAt(i) == 'X') { throw new NumberFormatException("Too many duplicate numeral character"); } From 80a47116361784e1bfb447b4cde14ce75a316c81 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:29:55 +0300 Subject: [PATCH 067/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ src/RomanNumerals.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index c89b313..f6ced33 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -56,3 +56,8 @@ UnitTestCaseAction 1475072658012 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072658013 TestRomanNumerals.java FAIL EditAction 1475072681527 RomanNumerals.java 1392 3 8 0 EditAction 1475072853690 RomanNumerals.java 1392 3 8 0 +UnitTestCaseAction 1475072858026 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072858026 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475072887503 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475072887503 TestRomanNumerals.java FAIL +EditAction 1475072995227 RomanNumerals.java 1392 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 11a4c90..74fd3ed 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -8,7 +8,7 @@ public int convertToInteger(String romanNum) { int duplicates = 0; for (int i = 0; i < romanNum.length(); i++) { - if (i > 1) { + if (i > 0) { if (romanNum.charAt(i - 1) == romanNum.charAt(i)) { ++duplicates; } else { From d3772a865f982152eb754d6b4229bf2823b5eb30 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:30:04 +0300 Subject: [PATCH 068/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index f6ced33..5c20880 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -61,3 +61,4 @@ UnitTestSessionAction 1475072858026 TestRomanNumerals.java FAIL UnitTestCaseAction 1475072887503 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072887503 TestRomanNumerals.java FAIL EditAction 1475072995227 RomanNumerals.java 1392 3 8 0 +EditAction 1475073004129 TestRomanNumerals.java 4602 33 63 30 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 74fd3ed..8ba7212 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates > 2 && romanNum.charAt(i) == 'X') { + if (duplicates >= 3 && romanNum.charAt(i) == 'X') { throw new NumberFormatException("Too many duplicate numeral character"); } From 7277521565c9d077fde81f288ccec355817a116b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:30:34 +0300 Subject: [PATCH 069/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 7 ++++++- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 5c20880..cf3f6e1 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -62,3 +62,7 @@ UnitTestCaseAction 1475072887503 TestRomanNumerals.java FAIL UnitTestSessionAction 1475072887503 TestRomanNumerals.java FAIL EditAction 1475072995227 RomanNumerals.java 1392 3 8 0 EditAction 1475073004129 TestRomanNumerals.java 4602 33 63 30 +UnitTestCaseAction 1475073004645 TestRomanNumerals.java OK +UnitTestSessionAction 1475073004645 TestRomanNumerals.java OK +RefactoringAction 1475073030732 TestRomanNumerals.java ADD void testConvertIntegerFourX_Throw_NumberFormatException()/2 METHOD +EditAction 1475073034426 TestRomanNumerals.java 4757 34 64 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 4990f4d..6bd9bf4 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -2,3 +2,4 @@ 1475071927156 test-last 1 255 false 1475072644071 test-first 3 706 true 1475072644072 test-first 3 706 true +1475073004645 regression 2 356 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index ce1203e..e612031 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -1,2 +1,3 @@ 1475071927155 test-first 3 255 true 1475072644071 test-first 3 706 true +1475073004645 regression 2 356 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 6538f88..b3d7b5f 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -1,2 +1,3 @@ 1475071927155 test-first 3 255 true 1475072644071 test-first 3 716 true +1475073004645 regression 2 360 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7b405f6..a56e923 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -15,7 +15,12 @@ public void initialize() { public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } - + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerFourX_Throw_NumberFormatException() { + mNumerals.convertToInteger("IIII"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); From adf766f3bb6084cef423f38bb3e4541bd92c2007 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:31:18 +0300 Subject: [PATCH 070/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 11 +++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .../20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 11 ++++++++--- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index cf3f6e1..9c1090e 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -66,3 +66,14 @@ UnitTestCaseAction 1475073004645 TestRomanNumerals.java OK UnitTestSessionAction 1475073004645 TestRomanNumerals.java OK RefactoringAction 1475073030732 TestRomanNumerals.java ADD void testConvertIntegerFourX_Throw_NumberFormatException()/2 METHOD EditAction 1475073034426 TestRomanNumerals.java 4757 34 64 30 +CompilationAction 1475073034674 TestRomanNumerals.java +RefactoringAction 1475073053790 TestRomanNumerals.java ADD void testConvertIntegerFourX_Throw_NumberFormatException()/3 METHOD +RefactoringAction 1475073056307 TestRomanNumerals.java RENAME testConvertIntegerFourX_Throw_NumberFormatException()/3=>void testConvertIntegerThreeeX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073057327 TestRomanNumerals.java RENAME testConvertIntegerThreeeX_Throw_NumberFormatException()=>void testConvertIntegerThreeX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073058344 TestRomanNumerals.java RENAME testConvertIntegerThreeX_Throw_NumberFormatException()=>void testConvertIntegerThreeX_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073060865 TestRomanNumerals.java REMOVE testConvertIntegerFourX_Throw_NumberFormatException()/2 METHOD +UnitTestCaseAction 1475073063417 TestRomanNumerals.java OK +UnitTestSessionAction 1475073063417 TestRomanNumerals.java OK +RefactoringAction 1475073067391 TestRomanNumerals.java ADD void testConvertIntegerFourX_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073075439 TestRomanNumerals.java RENAME testConvertIntegerFourX_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_Throw_NumberFormatException() METHOD +EditAction 1475073078683 TestRomanNumerals.java 4919 35 65 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 6bd9bf4..a488b23 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -3,3 +3,5 @@ 1475072644071 test-first 3 706 true 1475072644072 test-first 3 706 true 1475073004645 regression 2 356 true +1475073063417 test-addition 1 32 true +1475073063418 test-addition 1 32 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index e612031..73f3031 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1475071927155 test-first 3 255 true 1475072644071 test-first 3 706 true 1475073004645 regression 2 356 false +1475073063417 test-addition 1 32 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index b3d7b5f..818779f 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1475071927155 test-first 3 255 true 1475072644071 test-first 3 716 true 1475073004645 regression 2 360 true +1475073063417 test-addition 1 58 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a56e923..1e4b518 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -15,16 +15,21 @@ public void initialize() { public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } - + @Test(expected=NumberFormatException.class) - public void testConvertIntegerFourX_Throw_NumberFormatException() { + public void testConvertIntegerFourI_Throw_NumberFormatException() { mNumerals.convertToInteger("IIII"); } - + @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); } + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerThreeX_NoThrow_NumberFormatException() { + mNumerals.convertToInteger("XXXX"); + } @Test public void testConvertToInteger_I_1() { From 2301224cb794af2982c6bc990e61478d36310e39 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:31:51 +0300 Subject: [PATCH 071/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ src/RomanNumerals.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 9c1090e..1e68e49 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -77,3 +77,7 @@ UnitTestSessionAction 1475073063417 TestRomanNumerals.java OK RefactoringAction 1475073067391 TestRomanNumerals.java ADD void testConvertIntegerFourX_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475073075439 TestRomanNumerals.java RENAME testConvertIntegerFourX_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_Throw_NumberFormatException() METHOD EditAction 1475073078683 TestRomanNumerals.java 4919 35 65 30 +UnitTestCaseAction 1475073079755 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073079755 TestRomanNumerals.java FAIL +CompilationAction 1475073108080 RomanNumerals.java +EditAction 1475073111180 RomanNumerals.java 1429 3 8 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8ba7212..4a38fa8 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,7 +16,8 @@ public int convertToInteger(String romanNum) { } } - if (duplicates >= 3 && romanNum.charAt(i) == 'X') { + if (duplicates >= 3 && (romanNum.charAt(i) == 'I' || + romanNum.charAt(i) == 'X')) { throw new NumberFormatException("Too many duplicate numeral character"); } From 60dcaada111a5c4824845021747fc96ccda0e402 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:31:59 +0300 Subject: [PATCH 072/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 7 ++++++- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 1e68e49..f71b94c 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -81,3 +81,8 @@ UnitTestCaseAction 1475073079755 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073079755 TestRomanNumerals.java FAIL CompilationAction 1475073108080 RomanNumerals.java EditAction 1475073111180 RomanNumerals.java 1429 3 8 0 +UnitTestCaseAction 1475073113989 TestRomanNumerals.java OK +UnitTestSessionAction 1475073113989 TestRomanNumerals.java OK +RefactoringAction 1475073116992 TestRomanNumerals.java ADD void testConvertIntegerFourI_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073119013 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD +EditAction 1475073119713 TestRomanNumerals.java 5075 36 66 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index a488b23..7be8bc4 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -5,3 +5,4 @@ 1475073004645 regression 2 356 true 1475073063417 test-addition 1 32 true 1475073063418 test-addition 1 32 true +1475073113989 test-first 3 46 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 73f3031..21fdfd2 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -2,3 +2,4 @@ 1475072644071 test-first 3 706 true 1475073004645 regression 2 356 false 1475073063417 test-addition 1 32 true +1475073113989 test-first 3 46 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 818779f..605f52e 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -2,3 +2,4 @@ 1475072644071 test-first 3 716 true 1475073004645 regression 2 360 true 1475073063417 test-addition 1 58 true +1475073113989 test-first 3 50 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 1e4b518..51eb18b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -15,11 +15,16 @@ public void initialize() { public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } - + @Test(expected=NumberFormatException.class) public void testConvertIntegerFourI_Throw_NumberFormatException() { mNumerals.convertToInteger("IIII"); } + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerFourI_NoThrow_NumberFormatException() { + mNumerals.convertToInteger("III"); + } @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { From 6a0c7f88b32c276b1bf738a944b92edc634ca055 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:32:37 +0300 Subject: [PATCH 073/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ tests/TestRomanNumerals.java | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index f71b94c..b46750b 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -86,3 +86,7 @@ UnitTestSessionAction 1475073113989 TestRomanNumerals.java OK RefactoringAction 1475073116992 TestRomanNumerals.java ADD void testConvertIntegerFourI_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475073119013 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD EditAction 1475073119713 TestRomanNumerals.java 5075 36 66 30 +UnitTestCaseAction 1475073121172 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073121173 TestRomanNumerals.java FAIL +RefactoringAction 1475073152042 TestRomanNumerals.java REMOVE testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD +EditAction 1475073157611 TestRomanNumerals.java 4880 35 65 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 51eb18b..04273f4 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -20,18 +20,13 @@ public void testConvertInteger_Throw_NumberFormatException() { public void testConvertIntegerFourI_Throw_NumberFormatException() { mNumerals.convertToInteger("IIII"); } - - @Test(expected=NumberFormatException.class) - public void testConvertIntegerFourI_NoThrow_NumberFormatException() { - mNumerals.convertToInteger("III"); - } @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); } - @Test(expected=NumberFormatException.class) + @Test public void testConvertIntegerThreeX_NoThrow_NumberFormatException() { mNumerals.convertToInteger("XXXX"); } From c70d5d99a6c01b415ec5136192da53bd4f3312c3 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:32:47 +0300 Subject: [PATCH 074/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index b46750b..fdb37eb 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -90,3 +90,6 @@ UnitTestCaseAction 1475073121172 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073121173 TestRomanNumerals.java FAIL RefactoringAction 1475073152042 TestRomanNumerals.java REMOVE testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD EditAction 1475073157611 TestRomanNumerals.java 4880 35 65 30 +UnitTestCaseAction 1475073161928 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073161928 TestRomanNumerals.java FAIL +EditAction 1475073167073 TestRomanNumerals.java 4879 35 65 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 04273f4..3d42385 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -28,7 +28,7 @@ public void testConvertIntegerFourX_Throw_NumberFormatException() { @Test public void testConvertIntegerThreeX_NoThrow_NumberFormatException() { - mNumerals.convertToInteger("XXXX"); + mNumerals.convertToInteger("XXX"); } @Test From 1a6fa2166a7f4c16fcdff854946436d096ccdf65 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:33:00 +0300 Subject: [PATCH 075/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ .besouro/20160928170751466/besouroEpisodes.txt | 3 +++ .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 15 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index fdb37eb..c05d9ae 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -93,3 +93,8 @@ EditAction 1475073157611 TestRomanNumerals.java 4880 35 65 30 UnitTestCaseAction 1475073161928 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073161928 TestRomanNumerals.java FAIL EditAction 1475073167073 TestRomanNumerals.java 4879 35 65 30 +UnitTestCaseAction 1475073167651 TestRomanNumerals.java OK +UnitTestSessionAction 1475073167651 TestRomanNumerals.java OK +RefactoringAction 1475073171591 TestRomanNumerals.java ADD void testConvertIntegerFourI_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073176132 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD +EditAction 1475073180404 TestRomanNumerals.java 4999 36 66 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 7be8bc4..f10f36a 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -6,3 +6,6 @@ 1475073063417 test-addition 1 32 true 1475073063418 test-addition 1 32 true 1475073113989 test-first 3 46 true +1475073167651 test-addition 2 50 true +1475073167652 test-addition 2 50 true +1475073167653 test-addition 1 50 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 21fdfd2..e0a0cb2 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -3,3 +3,4 @@ 1475073004645 regression 2 356 false 1475073063417 test-addition 1 32 true 1475073113989 test-first 3 46 true +1475073167651 test-addition 2 50 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 605f52e..3ce0fd9 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -3,3 +3,4 @@ 1475073004645 regression 2 360 true 1475073063417 test-addition 1 58 true 1475073113989 test-first 3 50 true +1475073167651 test-addition 2 53 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3d42385..406881a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -21,6 +21,11 @@ public void testConvertIntegerFourI_Throw_NumberFormatException() { mNumerals.convertToInteger("IIII"); } + @Test + public void testConvertIntegerFourI_NoThrow_NumberFormatException() { + mNumerals.convertToInteger("III"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerFourX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); From f604eeb18ccee45b3ebd1857480ca08a704bcddd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:35:01 +0300 Subject: [PATCH 076/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 19 +++++++++++++++++++ .../20160928170751466/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 18 ++++++++++++++---- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index c05d9ae..501da26 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -98,3 +98,22 @@ UnitTestSessionAction 1475073167651 TestRomanNumerals.java OK RefactoringAction 1475073171591 TestRomanNumerals.java ADD void testConvertIntegerFourI_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475073176132 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()/2=>void testConvertIntegerFourI_NoThrow_NumberFormatException() METHOD EditAction 1475073180404 TestRomanNumerals.java 4999 36 66 30 +UnitTestCaseAction 1475073180751 TestRomanNumerals.java OK +UnitTestSessionAction 1475073180751 TestRomanNumerals.java OK +RefactoringAction 1475073217675 TestRomanNumerals.java ADD void testConvertIntegerFourI_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073217678 TestRomanNumerals.java ADD void testConvertIntegerFourI_NoThrow_NumberFormatException()/2 METHOD +RefactoringAction 1475073229708 TestRomanNumerals.java RENAME testConvertIntegerFourI_NoThrow_NumberFormatException()/2=>void testConvertIntegerThreeI_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073250733 TestRomanNumerals.java RENAME testConvertIntegerFourX_Throw_NumberFormatException()=>void testConvertInteger_XXX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073253255 TestRomanNumerals.java RENAME testConvertInteger_XXX_Throw_NumberFormatException()=>void testConvertIntegerContains_XXX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073254271 TestRomanNumerals.java RENAME testConvertIntegerContains_XXX_Throw_NumberFormatException()=>void testConvertIntegerContains_CXXX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073259788 TestRomanNumerals.java RENAME testConvertIntegerThreeX_NoThrow_NumberFormatException()=>void testConvertIntegerContains_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073261804 TestRomanNumerals.java RENAME testConvertIntegerContains_CXXX_Throw_NumberFormatException()=>void testConvertIntegerContains_XXX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073263819 TestRomanNumerals.java RENAME testConvertIntegerContains_NoThrow_NumberFormatException()=>void testConvertIntegerContains_XXX_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073265345 TestRomanNumerals.java RENAME testConvertIntegerContains_XXX_Throw_NumberFormatException()=>void testConvertIntegerContains_XXXX_Throw_NumberFormatException() METHOD +RefactoringAction 1475073271363 TestRomanNumerals.java RENAME testConvertIntegerThreeI_NoThrow_NumberFormatException()=>void testConvertIntegerContains_III_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073278380 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()/2=>void testConvertIntegerContains_IIII_Throw_NumberFormatException() METHOD +RefactoringAction 1475073285399 TestRomanNumerals.java RENAME testConvertIntegerFourI_NoThrow_NumberFormatException()=>void testConvertIntegerContains_CC_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073286413 TestRomanNumerals.java RENAME testConvertIntegerContains_CC_NoThrow_NumberFormatException()=>void testConvertIntegerContains_CCC_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073291430 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()=>void testConvertIntege_Throw_NumberFormatException() METHOD +RefactoringAction 1475073294937 TestRomanNumerals.java RENAME testConvertIntege_Throw_NumberFormatException()=>void testConvertIntegerContains_CCCC_Throw_NumberFormatException() METHOD +EditAction 1475073301368 TestRomanNumerals.java 5320 38 68 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index f10f36a..5888e83 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -9,3 +9,4 @@ 1475073167651 test-addition 2 50 true 1475073167652 test-addition 2 50 true 1475073167653 test-addition 1 50 true +1475073180751 test-addition 1 9 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index e0a0cb2..73be758 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -4,3 +4,4 @@ 1475073063417 test-addition 1 32 true 1475073113989 test-first 3 46 true 1475073167651 test-addition 2 50 false +1475073180751 test-addition 1 9 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 3ce0fd9..8eeac34 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -4,3 +4,4 @@ 1475073063417 test-addition 1 58 true 1475073113989 test-first 3 50 true 1475073167651 test-addition 2 53 true +1475073180751 test-addition 1 13 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 406881a..1d86687 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -17,22 +17,32 @@ public void testConvertInteger_Throw_NumberFormatException() { } @Test(expected=NumberFormatException.class) - public void testConvertIntegerFourI_Throw_NumberFormatException() { + public void testConvertIntegerContains_CCCC_Throw_NumberFormatException() { + mNumerals.convertToInteger("CCCC"); + } + + @Test + public void testConvertIntegerContains_CCC_NoThrow_NumberFormatException() { + mNumerals.convertToInteger("CCC"); + } + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerContains_IIII_Throw_NumberFormatException() { mNumerals.convertToInteger("IIII"); } @Test - public void testConvertIntegerFourI_NoThrow_NumberFormatException() { + public void testConvertIntegerContains_III_NoThrow_NumberFormatException() { mNumerals.convertToInteger("III"); } @Test(expected=NumberFormatException.class) - public void testConvertIntegerFourX_Throw_NumberFormatException() { + public void testConvertIntegerContains_XXXX_Throw_NumberFormatException() { mNumerals.convertToInteger("XXXX"); } @Test - public void testConvertIntegerThreeX_NoThrow_NumberFormatException() { + public void testConvertIntegerContains_XXX_NoThrow_NumberFormatException() { mNumerals.convertToInteger("XXX"); } From 53a18e5510d93ac808511dc4457040968ec5200c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:35:32 +0300 Subject: [PATCH 077/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 11 +++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 4 ++++ .../20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 3 ++- tests/TestRomanNumerals.java | 10 ++++++++++ 6 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 501da26..23b159e 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -117,3 +117,14 @@ RefactoringAction 1475073286413 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475073291430 TestRomanNumerals.java RENAME testConvertIntegerFourI_Throw_NumberFormatException()=>void testConvertIntege_Throw_NumberFormatException() METHOD RefactoringAction 1475073294937 TestRomanNumerals.java RENAME testConvertIntege_Throw_NumberFormatException()=>void testConvertIntegerContains_CCCC_Throw_NumberFormatException() METHOD EditAction 1475073301368 TestRomanNumerals.java 5320 38 68 30 +UnitTestCaseAction 1475073302298 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073302298 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475073312295 TestRomanNumerals.java OK +UnitTestSessionAction 1475073312296 TestRomanNumerals.testConvertIntegerContains_CCCC_Throw_NumberFormatException OK +RefactoringAction 1475073317968 TestRomanNumerals.java ADD void testConvertIntegerContains_CCCC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073317968 TestRomanNumerals.java ADD void testConvertIntegerContains_CCC_NoThrow_NumberFormatException()/2 METHOD +RefactoringAction 1475073326515 TestRomanNumerals.java RENAME testConvertIntegerContains_CCCC_Throw_NumberFormatException()/2=>void testConvertIntegerContains_CC_Throw_NumberFormatException() METHOD +RefactoringAction 1475073328030 TestRomanNumerals.java RENAME testConvertIntegerContains_CC_Throw_NumberFormatException()=>void testConvertIntegerContains_MMMM_Throw_NumberFormatException() METHOD +RefactoringAction 1475073330054 TestRomanNumerals.java RENAME testConvertIntegerContains_CCC_NoThrow_NumberFormatException()/2=>void testConvertIntegerContains_CC_NoThrow_NumberFormatException() METHOD +RefactoringAction 1475073331574 TestRomanNumerals.java RENAME testConvertIntegerContains_CC_NoThrow_NumberFormatException()=>void testConvertIntegerContains_MMM_NoThrow_NumberFormatException() METHOD +EditAction 1475073332663 TestRomanNumerals.java 5611 40 70 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 5888e83..2a88bc3 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -10,3 +10,7 @@ 1475073167652 test-addition 2 50 true 1475073167653 test-addition 1 50 true 1475073180751 test-addition 1 9 true +1475073312296 test-addition 2 94 true +1475073312297 test-addition 1 94 true +1475073312298 test-addition 2 94 true +1475073312299 test-addition 1 94 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 73be758..4bd4a3b 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -5,3 +5,4 @@ 1475073113989 test-first 3 46 true 1475073167651 test-addition 2 50 false 1475073180751 test-addition 1 9 false +1475073312296 test-addition 2 94 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 8eeac34..49a6530 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -5,3 +5,4 @@ 1475073113989 test-first 3 50 true 1475073167651 test-addition 2 53 true 1475073180751 test-addition 1 13 true +1475073312296 test-addition 2 131 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 4a38fa8..52b320d 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -17,7 +17,8 @@ public int convertToInteger(String romanNum) { } if (duplicates >= 3 && (romanNum.charAt(i) == 'I' || - romanNum.charAt(i) == 'X')) { + romanNum.charAt(i) == 'X' || + romanNum.charAt(i) == 'C')) { throw new NumberFormatException("Too many duplicate numeral character"); } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 1d86687..51c9acf 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -16,6 +16,16 @@ public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } + @Test(expected=NumberFormatException.class) + public void testConvertIntegerContains_MMMM_Throw_NumberFormatException() { + mNumerals.convertToInteger("MMMM"); + } + + @Test + public void testConvertIntegerContains_MMM_NoThrow_NumberFormatException() { + mNumerals.convertToInteger("MMM"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_CCCC_Throw_NumberFormatException() { mNumerals.convertToInteger("CCCC"); From bf7036c4c5e74eda7e62178aecc2a3ab8e98ba3f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:37:37 +0300 Subject: [PATCH 078/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 16 ++++++++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 12 ++++++++++++ .../randomHeuristicEpisodes.txt | 2 ++ .besouro/20160928170751466/zorroEpisodes.txt | 2 ++ src/RomanNumerals.java | 17 ++++++++++++++--- tests/TestRomanNumerals.java | 5 +++++ 6 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 23b159e..6727774 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -128,3 +128,19 @@ RefactoringAction 1475073328030 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475073330054 TestRomanNumerals.java RENAME testConvertIntegerContains_CCC_NoThrow_NumberFormatException()/2=>void testConvertIntegerContains_CC_NoThrow_NumberFormatException() METHOD RefactoringAction 1475073331574 TestRomanNumerals.java RENAME testConvertIntegerContains_CC_NoThrow_NumberFormatException()=>void testConvertIntegerContains_MMM_NoThrow_NumberFormatException() METHOD EditAction 1475073332663 TestRomanNumerals.java 5611 40 70 30 +UnitTestCaseAction 1475073334427 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073334427 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475073343578 TestRomanNumerals.java OK +UnitTestSessionAction 1475073343578 TestRomanNumerals.java OK +RefactoringAction 1475073360693 RomanNumerals.java ADD boolean isNotRepeatable FIELD +RefactoringAction 1475073386711 RomanNumerals.java RENAME isNotRepeatable=>boolean isRepeatable FIELD +RefactoringAction 1475073390725 RomanNumerals.java RENAME isRepeatable=>boolean is FIELD +RefactoringAction 1475073393738 RomanNumerals.java RENAME is=>boolean i FIELD +RefactoringAction 1475073394749 RomanNumerals.java RENAME i=>boolean is FIELD +RefactoringAction 1475073397760 RomanNumerals.java RENAME is=>boolean isThreeTimes FIELD +RefactoringAction 1475073402272 RomanNumerals.java RENAME isThreeTimes=>boolean isThreeTimesRepeatable(char) METHOD +UnitTestCaseAction 1475073440259 TestRomanNumerals.java OK +UnitTestSessionAction 1475073440259 TestRomanNumerals.java OK +RefactoringAction 1475073444138 TestRomanNumerals.java ADD void testConvertIntegerContains_MMMM_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073451658 TestRomanNumerals.java RENAME testConvertIntegerContains_MMMM_Throw_NumberFormatException()/2=>void testConvertIntegerContains_LL_Throw_NumberFormatException() METHOD +EditAction 1475073457867 TestRomanNumerals.java 5772 41 71 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 2a88bc3..64d1a81 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -14,3 +14,15 @@ 1475073312297 test-addition 1 94 true 1475073312298 test-addition 2 94 true 1475073312299 test-addition 1 94 true +1475073343578 test-addition 1 25 true +1475073343579 test-addition 2 25 true +1475073343580 test-addition 1 25 true +1475073343581 test-addition 2 25 true +1475073440259 refactoring 2B 79 true +1475073440260 refactoring 2B 79 true +1475073440261 refactoring 2B 79 true +1475073440262 regression 1 79 true +1475073440263 refactoring 2B 79 true +1475073440264 refactoring 2B 79 true +1475073440265 refactoring 2B 79 true +1475073440266 refactoring 2B 79 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 4bd4a3b..9bb9ec1 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -6,3 +6,5 @@ 1475073167651 test-addition 2 50 false 1475073180751 test-addition 1 9 false 1475073312296 test-addition 2 94 true +1475073343578 test-addition 1 25 false +1475073440259 refactoring 2B 79 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 49a6530..5dd73ba 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -6,3 +6,5 @@ 1475073167651 test-addition 2 53 true 1475073180751 test-addition 1 13 true 1475073312296 test-addition 2 131 true +1475073343578 test-addition 1 31 true +1475073440259 refactoring 2B 96 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 52b320d..e4feae7 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,9 +16,7 @@ public int convertToInteger(String romanNum) { } } - if (duplicates >= 3 && (romanNum.charAt(i) == 'I' || - romanNum.charAt(i) == 'X' || - romanNum.charAt(i) == 'C')) { + if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { throw new NumberFormatException("Too many duplicate numeral character"); } @@ -49,6 +47,19 @@ private boolean canBeSubtrahendElementaryValue(char character) { return false; } + private boolean isThreeTimesRepeatable(char character) { + switch(character) { + case 'I': + case 'X': + case 'C': + case 'M': + return true; + } + + return false; + + } + private int getElementaryValue(char character) { switch(character) { case 'I': return 1; diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 51c9acf..746b3fc 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -16,6 +16,11 @@ public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } + @Test(expected=NumberFormatException.class) + public void testConvertIntegerContains_LL_Throw_NumberFormatException() { + mNumerals.convertToInteger("LL"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_MMMM_Throw_NumberFormatException() { mNumerals.convertToInteger("MMMM"); From 02609928d5401887bc6020309cce8a652cc40195 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:38:30 +0300 Subject: [PATCH 079/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 6 ++++++ src/RomanNumerals.java | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 6727774..e612cf5 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -144,3 +144,9 @@ UnitTestSessionAction 1475073440259 TestRomanNumerals.java OK RefactoringAction 1475073444138 TestRomanNumerals.java ADD void testConvertIntegerContains_MMMM_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475073451658 TestRomanNumerals.java RENAME testConvertIntegerContains_MMMM_Throw_NumberFormatException()/2=>void testConvertIntegerContains_LL_Throw_NumberFormatException() METHOD EditAction 1475073457867 TestRomanNumerals.java 5772 41 71 30 +UnitTestCaseAction 1475073465149 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073465149 TestRomanNumerals.java FAIL +RefactoringAction 1475073490415 RomanNumerals.java ADD boolean isThreeTimesRepeatable(char)/2 METHOD +RefactoringAction 1475073498456 RomanNumerals.java RENAME isThreeTimesRepeatable(char)/2=>boolean isZeroTimesRepeatable(char) METHOD +RefactoringAction 1475073508993 RomanNumerals.java RENAME isZeroTimesRepeatable(char)=>boolean isTimesRepeatable(char) METHOD +EditAction 1475073510892 RomanNumerals.java 1874 5 12 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e4feae7..365f403 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -15,6 +15,10 @@ public int convertToInteger(String romanNum) { duplicates = 0; } } + + if (duplicates >= 2 && isThreeTimesRepeatable(romanNum.charAt(i))) { + throw new NumberFormatException("Too many duplicate numeral character"); + } if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { throw new NumberFormatException("Too many duplicate numeral character"); @@ -46,6 +50,16 @@ private boolean canBeSubtrahendElementaryValue(char character) { return false; } + + private boolean isZeroTimesRepeatable(char character) { + switch(character) { + case 'L': + return true; + } + + return false; + + } private boolean isThreeTimesRepeatable(char character) { switch(character) { @@ -57,7 +71,6 @@ private boolean isThreeTimesRepeatable(char character) { } return false; - } private int getElementaryValue(char character) { From 53914e0f8fbdbedcf314b35ed94faaad86b475cb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:39:35 +0300 Subject: [PATCH 080/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ src/RomanNumerals.java | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index e612cf5..ad18ca1 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -150,3 +150,8 @@ RefactoringAction 1475073490415 RomanNumerals.java ADD boolean isThreeTimesRepea RefactoringAction 1475073498456 RomanNumerals.java RENAME isThreeTimesRepeatable(char)/2=>boolean isZeroTimesRepeatable(char) METHOD RefactoringAction 1475073508993 RomanNumerals.java RENAME isZeroTimesRepeatable(char)=>boolean isTimesRepeatable(char) METHOD EditAction 1475073510892 RomanNumerals.java 1874 5 12 0 +RefactoringAction 1475073523524 RomanNumerals.java RENAME isZeroTimesRepeatable(char)=>boolean isOneTimesRepeatable(char) METHOD +RefactoringAction 1475073525535 RomanNumerals.java RENAME isOneTimesRepeatable(char)=>boolean isOnlyuOneTimesRepeatable(char) METHOD +RefactoringAction 1475073528047 RomanNumerals.java RENAME isOnlyuOneTimesRepeatable(char)=>boolean isOneTimesRepeatable(char) METHOD +RefactoringAction 1475073532061 RomanNumerals.java RENAME isOneTimesRepeatable(char)=>boolean isOneTimeRepeatable(char) METHOD +EditAction 1475073575462 RomanNumerals.java 1871 5 12 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 365f403..218f628 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -16,12 +16,12 @@ public int convertToInteger(String romanNum) { } } - if (duplicates >= 2 && isThreeTimesRepeatable(romanNum.charAt(i))) { - throw new NumberFormatException("Too many duplicate numeral character"); + if (duplicates >= 1 && isOneTimeRepeatable(romanNum.charAt(i))) { + throw new NumberFormatException("Too many duplicate numeral characters"); } if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { - throw new NumberFormatException("Too many duplicate numeral character"); + throw new NumberFormatException("Too many duplicate numeral characters"); } if ((i + 1 < romanNum.length()) && @@ -51,7 +51,7 @@ private boolean canBeSubtrahendElementaryValue(char character) { return false; } - private boolean isZeroTimesRepeatable(char character) { + private boolean isOneTimeRepeatable(char character) { switch(character) { case 'L': return true; From 40f0e7f9865f92290e0e21e1d6babd894f2dbe31 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:40:01 +0300 Subject: [PATCH 081/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 14 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index ad18ca1..21e3813 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -155,3 +155,8 @@ RefactoringAction 1475073525535 RomanNumerals.java RENAME isOneTimesRepeatable(c RefactoringAction 1475073528047 RomanNumerals.java RENAME isOnlyuOneTimesRepeatable(char)=>boolean isOneTimesRepeatable(char) METHOD RefactoringAction 1475073532061 RomanNumerals.java RENAME isOneTimesRepeatable(char)=>boolean isOneTimeRepeatable(char) METHOD EditAction 1475073575462 RomanNumerals.java 1871 5 12 0 +UnitTestCaseAction 1475073583808 TestRomanNumerals.java OK +UnitTestSessionAction 1475073583809 TestRomanNumerals.java OK +RefactoringAction 1475073586729 TestRomanNumerals.java ADD void testConvertIntegerContains_LL_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073601094 TestRomanNumerals.java RENAME testConvertIntegerContains_LL_Throw_NumberFormatException()/2=>void testConvertIntegerContains_VV_Throw_NumberFormatException() METHOD +EditAction 1475073601281 TestRomanNumerals.java 5933 42 72 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 64d1a81..eababe7 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -26,3 +26,5 @@ 1475073440264 refactoring 2B 79 true 1475073440265 refactoring 2B 79 true 1475073440266 refactoring 2B 79 true +1475073583809 test-first 3 139 true +1475073583810 test-first 3 139 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 9bb9ec1..44b29d0 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -8,3 +8,4 @@ 1475073312296 test-addition 2 94 true 1475073343578 test-addition 1 25 false 1475073440259 refactoring 2B 79 true +1475073583809 test-first 3 139 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 5dd73ba..3ebc6e2 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -8,3 +8,4 @@ 1475073312296 test-addition 2 131 true 1475073343578 test-addition 1 31 true 1475073440259 refactoring 2B 96 true +1475073583809 test-first 3 143 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 746b3fc..2c3fb88 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -16,6 +16,11 @@ public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } + @Test(expected=NumberFormatException.class) + public void testConvertIntegerContains_VV_Throw_NumberFormatException() { + mNumerals.convertToInteger("VV"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_LL_Throw_NumberFormatException() { mNumerals.convertToInteger("LL"); From b375ac74ed0852c00cc7348e539598337b500271 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:40:09 +0300 Subject: [PATCH 082/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 1 + 2 files changed, 4 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 21e3813..ce4a418 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -160,3 +160,6 @@ UnitTestSessionAction 1475073583809 TestRomanNumerals.java OK RefactoringAction 1475073586729 TestRomanNumerals.java ADD void testConvertIntegerContains_LL_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475073601094 TestRomanNumerals.java RENAME testConvertIntegerContains_LL_Throw_NumberFormatException()/2=>void testConvertIntegerContains_VV_Throw_NumberFormatException() METHOD EditAction 1475073601281 TestRomanNumerals.java 5933 42 72 30 +UnitTestCaseAction 1475073602044 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073602044 TestRomanNumerals.java FAIL +EditAction 1475073609742 RomanNumerals.java 1883 5 12 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 218f628..fa12a67 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -53,6 +53,7 @@ private boolean canBeSubtrahendElementaryValue(char character) { private boolean isOneTimeRepeatable(char character) { switch(character) { + case 'B': case 'L': return true; } From ef098cbb270de4426a1946576fe30e735de5e205 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:40:10 +0300 Subject: [PATCH 083/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index ce4a418..54fe76e 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -163,3 +163,4 @@ EditAction 1475073601281 TestRomanNumerals.java 5933 42 72 30 UnitTestCaseAction 1475073602044 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073602044 TestRomanNumerals.java FAIL EditAction 1475073609742 RomanNumerals.java 1883 5 12 0 +EditAction 1475073610911 RomanNumerals.java 1883 5 12 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index fa12a67..1e4fac5 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -53,7 +53,7 @@ private boolean canBeSubtrahendElementaryValue(char character) { private boolean isOneTimeRepeatable(char character) { switch(character) { - case 'B': + case 'V': case 'L': return true; } From 0bf5c5a17b390c3b78c2586ed1f86807c01be070 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:40:24 +0300 Subject: [PATCH 084/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 12 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 54fe76e..b51deee 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -164,3 +164,7 @@ UnitTestCaseAction 1475073602044 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073602044 TestRomanNumerals.java FAIL EditAction 1475073609742 RomanNumerals.java 1883 5 12 0 EditAction 1475073610911 RomanNumerals.java 1883 5 12 0 +UnitTestCaseAction 1475073612967 TestRomanNumerals.java OK +UnitTestSessionAction 1475073612968 TestRomanNumerals.java OK +RefactoringAction 1475073617819 TestRomanNumerals.java ADD void testConvertIntegerContains_VV_Throw_NumberFormatException()/2 METHOD +EditAction 1475073624080 TestRomanNumerals.java 6093 43 73 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index eababe7..1c08d26 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -28,3 +28,4 @@ 1475073440266 refactoring 2B 79 true 1475073583809 test-first 3 139 true 1475073583810 test-first 3 139 true +1475073612968 test-first 3 26 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 44b29d0..711896f 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -9,3 +9,4 @@ 1475073343578 test-addition 1 25 false 1475073440259 refactoring 2B 79 true 1475073583809 test-first 3 139 true +1475073612968 test-first 3 26 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 3ebc6e2..a791956 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -9,3 +9,4 @@ 1475073343578 test-addition 1 31 true 1475073440259 refactoring 2B 96 true 1475073583809 test-first 3 143 true +1475073612968 test-first 3 29 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2c3fb88..8534b8d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -25,6 +25,11 @@ public void testConvertIntegerContains_VV_Throw_NumberFormatException() { public void testConvertIntegerContains_LL_Throw_NumberFormatException() { mNumerals.convertToInteger("LL"); } + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerContains_DD_Throw_NumberFormatException() { + mNumerals.convertToInteger("DD"); + } @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_MMMM_Throw_NumberFormatException() { From d0a35b181005d6478c4de299d4c55a8a5dfd548d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:40:33 +0300 Subject: [PATCH 085/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 1 + 2 files changed, 4 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index b51deee..2b858e0 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -168,3 +168,6 @@ UnitTestCaseAction 1475073612967 TestRomanNumerals.java OK UnitTestSessionAction 1475073612968 TestRomanNumerals.java OK RefactoringAction 1475073617819 TestRomanNumerals.java ADD void testConvertIntegerContains_VV_Throw_NumberFormatException()/2 METHOD EditAction 1475073624080 TestRomanNumerals.java 6093 43 73 30 +UnitTestCaseAction 1475073629676 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073629676 TestRomanNumerals.java FAIL +EditAction 1475073633072 RomanNumerals.java 1895 5 12 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1e4fac5..5fbff3f 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -55,6 +55,7 @@ private boolean isOneTimeRepeatable(char character) { switch(character) { case 'V': case 'L': + case 'D': return true; } From 4a0dad5f1a703e2d888d1cd7d8b87ccccb0acd57 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:41:34 +0300 Subject: [PATCH 086/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 12 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 2b858e0..cbae5f3 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -171,3 +171,7 @@ EditAction 1475073624080 TestRomanNumerals.java 6093 43 73 30 UnitTestCaseAction 1475073629676 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073629676 TestRomanNumerals.java FAIL EditAction 1475073633072 RomanNumerals.java 1895 5 12 0 +UnitTestCaseAction 1475073635539 TestRomanNumerals.java OK +UnitTestSessionAction 1475073635539 TestRomanNumerals.java OK +RefactoringAction 1475073683391 TestRomanNumerals.java ADD void testConvertInteger_Throw_NumberFormatException()/2 METHOD +EditAction 1475073694220 TestRomanNumerals.java 6241 44 74 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 1c08d26..c72b9d5 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -29,3 +29,4 @@ 1475073583809 test-first 3 139 true 1475073583810 test-first 3 139 true 1475073612968 test-first 3 26 true +1475073635539 test-first 3 17 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 711896f..ed7c32a 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -10,3 +10,4 @@ 1475073440259 refactoring 2B 79 true 1475073583809 test-first 3 139 true 1475073612968 test-first 3 26 true +1475073635539 test-first 3 17 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index a791956..d9f25bd 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -10,3 +10,4 @@ 1475073440259 refactoring 2B 96 true 1475073583809 test-first 3 143 true 1475073612968 test-first 3 29 true +1475073635539 test-first 3 22 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 8534b8d..4d0474a 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,6 +11,11 @@ public void initialize() { mNumerals = new RomanNumerals(); } + @Test(expected=NumberFormatException.class) + public void testConvertInteger_Throw_NumberFormatException() { + mNumerals.convertToInteger(""); + } + @Test(expected=NumberFormatException.class) public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); From c8a31422ca3283318394f4885ee8af8a0ed2d2f2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:42:50 +0300 Subject: [PATCH 087/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 11 +++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .../20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 10 +++++++--- tests/TestRomanNumerals.java | 7 ++++++- 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index cbae5f3..780d837 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -175,3 +175,14 @@ UnitTestCaseAction 1475073635539 TestRomanNumerals.java OK UnitTestSessionAction 1475073635539 TestRomanNumerals.java OK RefactoringAction 1475073683391 TestRomanNumerals.java ADD void testConvertInteger_Throw_NumberFormatException()/2 METHOD EditAction 1475073694220 TestRomanNumerals.java 6241 44 74 30 +CompilationAction 1475073694449 TestRomanNumerals.java +RefactoringAction 1475073704469 TestRomanNumerals.java RENAME testConvertInteger_Throw_NumberFormatException()/2=>void testConvertIntegerEmpty_Throw_NumberFormatException() METHOD +CompilationAction 1475073710187 TestRomanNumerals.java +UnitTestCaseAction 1475073710509 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073710509 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475073756819 TestRomanNumerals.java OK +UnitTestSessionAction 1475073756819 TestRomanNumerals.java OK +RefactoringAction 1475073760026 TestRomanNumerals.java ADD void testConvertIntegerEmpty_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073765560 TestRomanNumerals.java RENAME testConvertIntegerEmpty_Throw_NumberFormatException()/2=>void testConvertIntegerNULLThrow_NumberFormatException() METHOD +RefactoringAction 1475073767580 TestRomanNumerals.java RENAME testConvertIntegerNULLThrow_NumberFormatException()=>void testConvertIntegerNull_Throw_NumberFormatException() METHOD +EditAction 1475073770024 TestRomanNumerals.java 6400 45 75 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index c72b9d5..0dc07ab 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -30,3 +30,5 @@ 1475073583810 test-first 3 139 true 1475073612968 test-first 3 26 true 1475073635539 test-first 3 17 true +1475073756819 test-addition 2 73 true +1475073756820 test-addition 1 73 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index ed7c32a..d088856 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -11,3 +11,4 @@ 1475073583809 test-first 3 139 true 1475073612968 test-first 3 26 true 1475073635539 test-first 3 17 true +1475073756819 test-addition 2 73 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index d9f25bd..bceb625 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -11,3 +11,4 @@ 1475073583809 test-first 3 143 true 1475073612968 test-first 3 29 true 1475073635539 test-first 3 22 true +1475073756819 test-addition 2 121 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 5fbff3f..1ddf451 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,10 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { + if (romanNum.isEmpty()) { + throw new NumberFormatException("Empty roman numeral."); + } + int retValue = 0; int lastSub = 0; @@ -17,11 +21,11 @@ public int convertToInteger(String romanNum) { } if (duplicates >= 1 && isOneTimeRepeatable(romanNum.charAt(i))) { - throw new NumberFormatException("Too many duplicate numeral characters"); + throw new NumberFormatException("Too many duplicate numeral characters."); } if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { - throw new NumberFormatException("Too many duplicate numeral characters"); + throw new NumberFormatException("Too many duplicate numeral characters."); } if ((i + 1 < romanNum.length()) && @@ -85,7 +89,7 @@ private int getElementaryValue(char character) { case 'D': return 500; case 'M': return 1000; default: - throw new NumberFormatException("Invalid numeral character"); + throw new NumberFormatException("Invalid numeral character."); } } } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 4d0474a..7a8809c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -10,9 +10,14 @@ public class TestRomanNumerals { public void initialize() { mNumerals = new RomanNumerals(); } + + @Test(expected=NumberFormatException.class) + public void testConvertIntegerNull_Throw_NumberFormatException() { + mNumerals.convertToInteger(null); + } @Test(expected=NumberFormatException.class) - public void testConvertInteger_Throw_NumberFormatException() { + public void testConvertIntegerEmpty_Throw_NumberFormatException() { mNumerals.convertToInteger(""); } From 702153caf0a93cc1141ea3aba3fd3ddfadfe019c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:45:18 +0300 Subject: [PATCH 088/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 17 +++++++++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 2 ++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 6 ++++-- tests/TestRomanNumerals.java | 5 +++++ 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 780d837..ade15d4 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -186,3 +186,20 @@ RefactoringAction 1475073760026 TestRomanNumerals.java ADD void testConvertInteg RefactoringAction 1475073765560 TestRomanNumerals.java RENAME testConvertIntegerEmpty_Throw_NumberFormatException()/2=>void testConvertIntegerNULLThrow_NumberFormatException() METHOD RefactoringAction 1475073767580 TestRomanNumerals.java RENAME testConvertIntegerNULLThrow_NumberFormatException()=>void testConvertIntegerNull_Throw_NumberFormatException() METHOD EditAction 1475073770024 TestRomanNumerals.java 6400 45 75 30 +UnitTestCaseAction 1475073773129 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073773129 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475073789539 TestRomanNumerals.java OK +UnitTestSessionAction 1475073789540 TestRomanNumerals.java OK +RefactoringAction 1475073886647 TestRomanNumerals.java ADD void testConvertIntegerEmpty_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073895677 TestRomanNumerals.java RENAME testConvertIntegerEmpty_Throw_NumberFormatException()/2=>void testConvertIntegerS_Throw_NumberFormatException() METHOD +RefactoringAction 1475073896693 TestRomanNumerals.java RENAME testConvertIntegerS_Throw_NumberFormatException()=>void testConvertInteger_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475073899707 TestRomanNumerals.java RENAME testConvertInteger_Throw_NumberFormatException()/2=>void testConvertInteger_Subtract_Throw_NumberFormatException() METHOD +RefactoringAction 1475073902722 TestRomanNumerals.java RENAME testConvertInteger_Subtract_Throw_NumberFormatException()=>void testConvertInteger__Throw_NumberFormatException() METHOD +RefactoringAction 1475073905237 TestRomanNumerals.java RENAME testConvertInteger__Throw_NumberFormatException()=>void testConvertInteger_Subtract_Throw_NumberFormatException() METHOD +RefactoringAction 1475073909759 TestRomanNumerals.java RENAME testConvertInteger_Subtract_Throw_NumberFormatException()=>void testConvertInteger_Subtract__Throw_NumberFormatException() METHOD +RefactoringAction 1475073911275 TestRomanNumerals.java RENAME testConvertInteger_Subtract__Throw_NumberFormatException()=>void testConvertInteger_Subtract_5_Throw_NumberFormatException() METHOD +RefactoringAction 1475073913296 TestRomanNumerals.java RENAME testConvertInteger_Subtract_5_Throw_NumberFormatException()=>void testConvertInteger_Subtract_5_From_Throw_NumberFormatException() METHOD +RefactoringAction 1475073915813 TestRomanNumerals.java RENAME testConvertInteger_Subtract_5_From_Throw_NumberFormatException()=>void testConvertInteger_Subtract__Throw_NumberFormatException() METHOD +RefactoringAction 1475073916825 TestRomanNumerals.java RENAME testConvertInteger_Subtract__Throw_NumberFormatException()=>void testConvertInteger_Subtract_I_Throw_NumberFormatException() METHOD +RefactoringAction 1475073918471 TestRomanNumerals.java RENAME testConvertInteger_Subtract_I_Throw_NumberFormatException()=>void testConvertInteger_Subtract_I_M_Throw_NumberFormatException() METHOD +EditAction 1475073918545 TestRomanNumerals.java 6561 46 76 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 0dc07ab..2782cd9 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -32,3 +32,5 @@ 1475073635539 test-first 3 17 true 1475073756819 test-addition 2 73 true 1475073756820 test-addition 1 73 true +1475073789540 test-addition 2 29 true +1475073789541 test-addition 1 29 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index d088856..624ad0a 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -12,3 +12,4 @@ 1475073612968 test-first 3 26 true 1475073635539 test-first 3 17 true 1475073756819 test-addition 2 73 false +1475073789540 test-addition 2 29 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index bceb625..ecc638a 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -12,3 +12,4 @@ 1475073612968 test-first 3 29 true 1475073635539 test-first 3 22 true 1475073756819 test-addition 2 121 true +1475073789540 test-addition 2 32 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1ddf451..538386e 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,6 +1,10 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { + if (romanNum == null) { + throw new NumberFormatException("Null roman numeral."); + } + if (romanNum.isEmpty()) { throw new NumberFormatException("Empty roman numeral."); } @@ -39,8 +43,6 @@ public int convertToInteger(String romanNum) { } } - // TODO characters repeating (tests first...) - return retValue; } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7a8809c..4558d46 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -26,6 +26,11 @@ public void testConvertInteger_Throw_NumberFormatException() { mNumerals.convertToInteger("IO"); } + @Test(expected=NumberFormatException.class) + public void testConvertInteger_Subtract_I_M_Throw_NumberFormatException() { + mNumerals.convertToInteger(""); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_VV_Throw_NumberFormatException() { mNumerals.convertToInteger("VV"); From b13b784db06cc547b48b42a8bce5b67e4519c993 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:45:38 +0300 Subject: [PATCH 089/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ tests/TestRomanNumerals.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index ade15d4..d24da63 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -203,3 +203,6 @@ RefactoringAction 1475073915813 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475073916825 TestRomanNumerals.java RENAME testConvertInteger_Subtract__Throw_NumberFormatException()=>void testConvertInteger_Subtract_I_Throw_NumberFormatException() METHOD RefactoringAction 1475073918471 TestRomanNumerals.java RENAME testConvertInteger_Subtract_I_Throw_NumberFormatException()=>void testConvertInteger_Subtract_I_M_Throw_NumberFormatException() METHOD EditAction 1475073918545 TestRomanNumerals.java 6561 46 76 30 +RefactoringAction 1475073932991 TestRomanNumerals.java RENAME testConvertInteger_Subtract_I_M_Throw_NumberFormatException()=>void testConvertInteger_I_M_Throw_NumberFormatException() METHOD +RefactoringAction 1475073934512 TestRomanNumerals.java RENAME testConvertInteger_I_M_Throw_NumberFormatException()=>void testConvertInteger_IM_Throw_NumberFormatException() METHOD +EditAction 1475073937998 TestRomanNumerals.java 6553 46 76 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 4558d46..357841e 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -27,8 +27,8 @@ public void testConvertInteger_Throw_NumberFormatException() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_Subtract_I_M_Throw_NumberFormatException() { - mNumerals.convertToInteger(""); + public void testConvertInteger_IM_Throw_NumberFormatException() { + mNumerals.convertToInteger("IM"); } @Test(expected=NumberFormatException.class) From dfe45ee3768e9fb25e586deafc231559f1af110d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:46:09 +0300 Subject: [PATCH 090/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + tests/TestRomanNumerals.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index d24da63..e7f85c5 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -206,3 +206,4 @@ EditAction 1475073918545 TestRomanNumerals.java 6561 46 76 30 RefactoringAction 1475073932991 TestRomanNumerals.java RENAME testConvertInteger_Subtract_I_M_Throw_NumberFormatException()=>void testConvertInteger_I_M_Throw_NumberFormatException() METHOD RefactoringAction 1475073934512 TestRomanNumerals.java RENAME testConvertInteger_I_M_Throw_NumberFormatException()=>void testConvertInteger_IM_Throw_NumberFormatException() METHOD EditAction 1475073937998 TestRomanNumerals.java 6553 46 76 30 +EditAction 1475073969934 TestRomanNumerals.java 6553 46 76 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 357841e..6c9c78f 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -27,8 +27,8 @@ public void testConvertInteger_Throw_NumberFormatException() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_IM_Throw_NumberFormatException() { - mNumerals.convertToInteger("IM"); + public void testConvertInteger_IL_Throw_NumberFormatException() { + mNumerals.convertToInteger("IL"); } @Test(expected=NumberFormatException.class) From 8f8fdf78cfb1ec77647f9c268e8c1ae838c4fead Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:48:44 +0300 Subject: [PATCH 091/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index e7f85c5..3f687e7 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -207,3 +207,6 @@ RefactoringAction 1475073932991 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475073934512 TestRomanNumerals.java RENAME testConvertInteger_I_M_Throw_NumberFormatException()=>void testConvertInteger_IM_Throw_NumberFormatException() METHOD EditAction 1475073937998 TestRomanNumerals.java 6553 46 76 30 EditAction 1475073969934 TestRomanNumerals.java 6553 46 76 30 +UnitTestCaseAction 1475073984149 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475073984149 TestRomanNumerals.java FAIL +EditAction 1475074124205 RomanNumerals.java 2249 5 14 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 538386e..165f4ac 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -35,6 +35,14 @@ public int convertToInteger(String romanNum) { if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { + + int diff = getElementaryValue(romanNum.charAt(i + 1)) + - getElementaryValue(romanNum.charAt(i)); + + if (diff > 2) { + throw new NumberFormatException("Illegal subtraction format"); + } + lastSub = getElementaryValue(romanNum.charAt(i)); } else { From aedbd8e09fc466e8966735a42149d5582c030b3b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:49:09 +0300 Subject: [PATCH 092/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 3f687e7..40ab75a 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -210,3 +210,6 @@ EditAction 1475073969934 TestRomanNumerals.java 6553 46 76 30 UnitTestCaseAction 1475073984149 TestRomanNumerals.java FAIL UnitTestSessionAction 1475073984149 TestRomanNumerals.java FAIL EditAction 1475074124205 RomanNumerals.java 2249 5 14 0 +UnitTestCaseAction 1475074129042 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475074129042 TestRomanNumerals.java FAIL +EditAction 1475074149377 RomanNumerals.java 2249 5 14 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 165f4ac..17b1bcf 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -39,7 +39,7 @@ public int convertToInteger(String romanNum) { int diff = getElementaryValue(romanNum.charAt(i + 1)) - getElementaryValue(romanNum.charAt(i)); - if (diff > 2) { + if (diff > 3) { throw new NumberFormatException("Illegal subtraction format"); } From 7bb9337a370be0f5002c26029d18cb6f0b1b39d0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:49:20 +0300 Subject: [PATCH 093/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 3 +++ src/RomanNumerals.java | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 40ab75a..6af3c17 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -213,3 +213,6 @@ EditAction 1475074124205 RomanNumerals.java 2249 5 14 0 UnitTestCaseAction 1475074129042 TestRomanNumerals.java FAIL UnitTestSessionAction 1475074129042 TestRomanNumerals.java FAIL EditAction 1475074149377 RomanNumerals.java 2249 5 14 0 +UnitTestCaseAction 1475074151575 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475074151576 TestRomanNumerals.java FAIL +EditAction 1475074160811 RomanNumerals.java 2044 5 14 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 17b1bcf..0757d3a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -36,12 +36,6 @@ public int convertToInteger(String romanNum) { canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { - int diff = getElementaryValue(romanNum.charAt(i + 1)) - - getElementaryValue(romanNum.charAt(i)); - - if (diff > 3) { - throw new NumberFormatException("Illegal subtraction format"); - } lastSub = getElementaryValue(romanNum.charAt(i)); From eaf71623acd362adb66d0433c1fed3ab87fc7f14 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:50:08 +0300 Subject: [PATCH 094/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 7 +++++++ src/RomanNumerals.java | 22 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 6af3c17..5c1b9c8 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -216,3 +216,10 @@ EditAction 1475074149377 RomanNumerals.java 2249 5 14 0 UnitTestCaseAction 1475074151575 TestRomanNumerals.java FAIL UnitTestSessionAction 1475074151576 TestRomanNumerals.java FAIL EditAction 1475074160811 RomanNumerals.java 2044 5 14 0 +UnitTestCaseAction 1475074164048 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475074164048 TestRomanNumerals.java FAIL +RefactoringAction 1475074189876 RomanNumerals.java ADD int getElementaryValue(char)/2 METHOD +RefactoringAction 1475074191898 RomanNumerals.java RENAME getElementaryValue(char)/2=>int g(char) METHOD +RefactoringAction 1475074193409 RomanNumerals.java RENAME g(char)=>int getElementar(char) METHOD +RefactoringAction 1475074194924 RomanNumerals.java RENAME getElementar(char)=>int getElementaryIndex(char) METHOD +EditAction 1475074208460 RomanNumerals.java 2560 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 0757d3a..ad98c35 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -36,6 +36,12 @@ public int convertToInteger(String romanNum) { canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { + int diff = getElementaryValue(romanNum.charAt(i + 1)) + - getElementaryValue(romanNum.charAt(i)); + + if (diff > 3) { + throw new NumberFormatException("Illegal subtraction format"); + } lastSub = getElementaryValue(romanNum.charAt(i)); @@ -82,7 +88,7 @@ private boolean isThreeTimesRepeatable(char character) { return false; } - + private int getElementaryValue(char character) { switch(character) { case 'I': return 1; @@ -96,4 +102,18 @@ private int getElementaryValue(char character) { throw new NumberFormatException("Invalid numeral character."); } } + + private int getElementaryIndex(char character) { + switch(character) { + case 'I': return 0; + case 'V': return 1; + case 'X': return 2; + case 'L': return 3; + case 'C': return 4; + case 'D': return 5; + case 'M': return 6; + default: + throw new NumberFormatException("Invalid numeral character."); + } + } } From a3921ccb8ea73061822bcba0722e1ef86ef459af Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:50:12 +0300 Subject: [PATCH 095/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 5c1b9c8..edf8c2d 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -223,3 +223,4 @@ RefactoringAction 1475074191898 RomanNumerals.java RENAME getElementaryValue(cha RefactoringAction 1475074193409 RomanNumerals.java RENAME g(char)=>int getElementar(char) METHOD RefactoringAction 1475074194924 RomanNumerals.java RENAME getElementar(char)=>int getElementaryIndex(char) METHOD EditAction 1475074208460 RomanNumerals.java 2560 6 15 0 +EditAction 1475074212606 RomanNumerals.java 2560 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ad98c35..95e0258 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -36,8 +36,8 @@ public int convertToInteger(String romanNum) { canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { - int diff = getElementaryValue(romanNum.charAt(i + 1)) - - getElementaryValue(romanNum.charAt(i)); + int diff = getElementaryIndex(romanNum.charAt(i + 1)) + - getElementaryIndex(romanNum.charAt(i)); if (diff > 3) { throw new NumberFormatException("Illegal subtraction format"); From 93e1f55cb0900e8a162ea4f5fc11c1a997852463 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:50:18 +0300 Subject: [PATCH 096/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index edf8c2d..50e378b 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -224,3 +224,4 @@ RefactoringAction 1475074193409 RomanNumerals.java RENAME g(char)=>int getElemen RefactoringAction 1475074194924 RomanNumerals.java RENAME getElementar(char)=>int getElementaryIndex(char) METHOD EditAction 1475074208460 RomanNumerals.java 2560 6 15 0 EditAction 1475074212606 RomanNumerals.java 2560 6 15 0 +EditAction 1475074218151 RomanNumerals.java 2560 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 95e0258..3d71531 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -39,7 +39,7 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (diff > 3) { + if (diff > 2) { throw new NumberFormatException("Illegal subtraction format"); } From 642f3b277a1dce6daabefeb87bdf98b949553973 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:50:41 +0300 Subject: [PATCH 097/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ .besouro/20160928170751466/besouroEpisodes.txt | 8 ++++++++ .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 5 files changed, 20 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 50e378b..1251a6e 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -225,3 +225,8 @@ RefactoringAction 1475074194924 RomanNumerals.java RENAME getElementar(char)=>in EditAction 1475074208460 RomanNumerals.java 2560 6 15 0 EditAction 1475074212606 RomanNumerals.java 2560 6 15 0 EditAction 1475074218151 RomanNumerals.java 2560 6 15 0 +UnitTestCaseAction 1475074220980 TestRomanNumerals.java OK +UnitTestSessionAction 1475074220981 TestRomanNumerals.java OK +RefactoringAction 1475074226681 TestRomanNumerals.java ADD void testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074238704 TestRomanNumerals.java RENAME testConvertInteger_IL_Throw_NumberFormatException()/2=>void testConvertInteger_IC_Throw_NumberFormatException() METHOD +EditAction 1475074241481 TestRomanNumerals.java 6705 47 77 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 2782cd9..dacc64a 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -34,3 +34,11 @@ 1475073756820 test-addition 1 73 true 1475073789540 test-addition 2 29 true 1475073789541 test-addition 1 29 true +1475074220981 test-first 3 334 true +1475074220982 test-first 3 334 true +1475074220983 test-first 3 334 true +1475074220984 test-first 3 334 true +1475074220985 test-first 3 334 true +1475074220986 test-first 3 334 true +1475074220987 test-first 3 334 true +1475074220988 test-first 3 334 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 624ad0a..ad0841a 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -13,3 +13,4 @@ 1475073635539 test-first 3 17 true 1475073756819 test-addition 2 73 false 1475073789540 test-addition 2 29 true +1475074220981 test-first 3 334 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index ecc638a..aaccf39 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -13,3 +13,4 @@ 1475073635539 test-first 3 22 true 1475073756819 test-addition 2 121 true 1475073789540 test-addition 2 32 true +1475074220981 test-first 3 431 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 6c9c78f..7dd6bbf 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -30,6 +30,11 @@ public void testConvertInteger_Throw_NumberFormatException() { public void testConvertInteger_IL_Throw_NumberFormatException() { mNumerals.convertToInteger("IL"); } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_IC_Throw_NumberFormatException() { + mNumerals.convertToInteger("IC"); + } @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_VV_Throw_NumberFormatException() { From 85b37702bdda249a49f755f03b0c78d5c747475c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:50:57 +0300 Subject: [PATCH 098/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 1251a6e..1d3527c 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -230,3 +230,8 @@ UnitTestSessionAction 1475074220981 TestRomanNumerals.java OK RefactoringAction 1475074226681 TestRomanNumerals.java ADD void testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475074238704 TestRomanNumerals.java RENAME testConvertInteger_IL_Throw_NumberFormatException()/2=>void testConvertInteger_IC_Throw_NumberFormatException() METHOD EditAction 1475074241481 TestRomanNumerals.java 6705 47 77 30 +RefactoringAction 1475074242736 TestRomanNumerals.java ADD void testConvertInteger_IC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074246777 TestRomanNumerals.java RENAME testConvertInteger_IC_Throw_NumberFormatException()/2=>void testConvertInteger_ID_Throw_NumberFormatException() METHOD +RefactoringAction 1475074252811 TestRomanNumerals.java ADD void testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074255830 TestRomanNumerals.java RENAME testConvertInteger_ID_Throw_NumberFormatException()/2=>void testConvertInteger_IM_Throw_NumberFormatException() METHOD +EditAction 1475074257290 TestRomanNumerals.java 7010 49 79 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7dd6bbf..dbf7632 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -35,6 +35,16 @@ public void testConvertInteger_IL_Throw_NumberFormatException() { public void testConvertInteger_IC_Throw_NumberFormatException() { mNumerals.convertToInteger("IC"); } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_ID_Throw_NumberFormatException() { + mNumerals.convertToInteger("ID"); + } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_IM_Throw_NumberFormatException() { + mNumerals.convertToInteger("IM"); + } @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_VV_Throw_NumberFormatException() { From c76c43a988c6000e19622d38654ee106f4642520 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:51:21 +0300 Subject: [PATCH 099/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 11 +++++++++++ .besouro/20160928170751466/besouroEpisodes.txt | 3 +++ .../20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 2 ++ 5 files changed, 18 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 1d3527c..1412610 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -235,3 +235,14 @@ RefactoringAction 1475074246777 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475074252811 TestRomanNumerals.java ADD void testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475074255830 TestRomanNumerals.java RENAME testConvertInteger_ID_Throw_NumberFormatException()/2=>void testConvertInteger_IM_Throw_NumberFormatException() METHOD EditAction 1475074257290 TestRomanNumerals.java 7010 49 79 30 +UnitTestCaseAction 1475074258258 TestRomanNumerals.java OK +UnitTestSessionAction 1475074258258 TestRomanNumerals.java OK +RefactoringAction 1475074266362 TestRomanNumerals.java ADD void testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074266363 TestRomanNumerals.java ADD void testConvertInteger_IC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074266363 TestRomanNumerals.java ADD void testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074266363 TestRomanNumerals.java ADD void testConvertInteger_IM_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074272420 TestRomanNumerals.java REMOVE testConvertInteger_IC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074272420 TestRomanNumerals.java REMOVE testConvertInteger_IM_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074272421 TestRomanNumerals.java REMOVE testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074272422 TestRomanNumerals.java REMOVE testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD +EditAction 1475074281393 TestRomanNumerals.java 7014 49 79 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index dacc64a..d7499ac 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -42,3 +42,6 @@ 1475074220986 test-first 3 334 true 1475074220987 test-first 3 334 true 1475074220988 test-first 3 334 true +1475074258258 test-addition 1 31 true +1475074258259 test-addition 1 31 true +1475074258260 test-addition 1 31 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index ad0841a..4c44ca1 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -14,3 +14,4 @@ 1475073756819 test-addition 2 73 false 1475073789540 test-addition 2 29 true 1475074220981 test-first 3 334 true +1475074258258 test-addition 1 31 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index aaccf39..1ec7739 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -14,3 +14,4 @@ 1475073756819 test-addition 2 121 true 1475073789540 test-addition 2 32 true 1475074220981 test-first 3 431 true +1475074258258 test-addition 1 37 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index dbf7632..586d149 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -46,6 +46,8 @@ public void testConvertInteger_IM_Throw_NumberFormatException() { mNumerals.convertToInteger("IM"); } + + @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_VV_Throw_NumberFormatException() { mNumerals.convertToInteger("VV"); From 0647ed7caa3ae5002e0f92e046a58f62026b838e Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:52:52 +0300 Subject: [PATCH 100/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 11 +++++++++++ tests/TestRomanNumerals.java | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 1412610..b990969 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -246,3 +246,14 @@ RefactoringAction 1475074272420 TestRomanNumerals.java REMOVE testConvertInteger RefactoringAction 1475074272421 TestRomanNumerals.java REMOVE testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475074272422 TestRomanNumerals.java REMOVE testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD EditAction 1475074281393 TestRomanNumerals.java 7014 49 79 30 +RefactoringAction 1475074286452 TestRomanNumerals.java ADD void testConvertInteger_IL_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074286452 TestRomanNumerals.java ADD void testConvertInteger_IC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074286453 TestRomanNumerals.java ADD void testConvertInteger_ID_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074286453 TestRomanNumerals.java ADD void testConvertInteger_IM_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475074317602 TestRomanNumerals.java RENAME testConvertInteger_IL_Throw_NumberFormatException()/2=>void testConvertInteger_L_Throw_NumberFormatException() METHOD +RefactoringAction 1475074320124 TestRomanNumerals.java RENAME testConvertInteger_L_Throw_NumberFormatException()=>void testConvertInteger_XL_Throw_NumberFormatException() METHOD +RefactoringAction 1475074323140 TestRomanNumerals.java RENAME testConvertInteger_XL_Throw_NumberFormatException()=>void testConvertInteger_XD_Throw_NumberFormatException() METHOD +RefactoringAction 1475074356693 TestRomanNumerals.java RENAME testConvertInteger_IC_Throw_NumberFormatException()/2=>void testConvertInteger_C_Throw_NumberFormatException() METHOD +RefactoringAction 1475074357707 TestRomanNumerals.java RENAME testConvertInteger_C_Throw_NumberFormatException()=>void testConvertInteger_XC_Throw_NumberFormatException() METHOD +RefactoringAction 1475074366721 TestRomanNumerals.java RENAME testConvertInteger_XC_Throw_NumberFormatException()=>void testConvertInteger_XM_Throw_NumberFormatException() METHOD +EditAction 1475074372634 TestRomanNumerals.java 7321 51 81 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 586d149..1fdb210 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -46,6 +46,18 @@ public void testConvertInteger_IM_Throw_NumberFormatException() { mNumerals.convertToInteger("IM"); } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_XD_Throw_NumberFormatException() { + mNumerals.convertToInteger("XD"); + } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_XM_Throw_NumberFormatException() { + mNumerals.convertToInteger("XM"); + } + + @Test(expected=NumberFormatException.class) From 9ffe4af3632d542066f4762889bc59470f7bd4f7 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:53:18 +0300 Subject: [PATCH 101/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 4 ++++ .besouro/20160928170751466/besouroEpisodes.txt | 8 ++++++++ .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 3 --- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index b990969..609f405 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -257,3 +257,7 @@ RefactoringAction 1475074356693 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475074357707 TestRomanNumerals.java RENAME testConvertInteger_C_Throw_NumberFormatException()=>void testConvertInteger_XC_Throw_NumberFormatException() METHOD RefactoringAction 1475074366721 TestRomanNumerals.java RENAME testConvertInteger_XC_Throw_NumberFormatException()=>void testConvertInteger_XM_Throw_NumberFormatException() METHOD EditAction 1475074372634 TestRomanNumerals.java 7321 51 81 30 +UnitTestCaseAction 1475074373958 TestRomanNumerals.java OK +UnitTestSessionAction 1475074373959 TestRomanNumerals.java OK +RefactoringAction 1475074376772 TestRomanNumerals.java ADD void testConvertInteger_XM_Throw_NumberFormatException()/2 METHOD +EditAction 1475074398897 TestRomanNumerals.java 7315 51 81 30 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index d7499ac..41d279a 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -45,3 +45,11 @@ 1475074258258 test-addition 1 31 true 1475074258259 test-addition 1 31 true 1475074258260 test-addition 1 31 true +1475074373959 test-addition 1 107 true +1475074373960 test-addition 1 107 true +1475074373961 test-addition 1 107 true +1475074373962 test-addition 1 107 true +1475074373963 test-addition 1 107 true +1475074373964 test-addition 1 107 true +1475074373965 test-addition 1 107 true +1475074373966 test-addition 1 107 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 4c44ca1..ca09464 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -15,3 +15,4 @@ 1475073789540 test-addition 2 29 true 1475074220981 test-first 3 334 true 1475074258258 test-addition 1 31 true +1475074373959 test-addition 1 107 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 1ec7739..18a6f35 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -15,3 +15,4 @@ 1475073789540 test-addition 2 32 true 1475074220981 test-first 3 431 true 1475074258258 test-addition 1 37 true +1475074373959 test-addition 1 115 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 1fdb210..cbbd84c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -57,9 +57,6 @@ public void testConvertInteger_XM_Throw_NumberFormatException() { mNumerals.convertToInteger("XM"); } - - - @Test(expected=NumberFormatException.class) public void testConvertIntegerContains_VV_Throw_NumberFormatException() { mNumerals.convertToInteger("VV"); From a27c0658dac889c6d87d41e27fa866c38c351b1b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:55:00 +0300 Subject: [PATCH 102/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 5 +++++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 -- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 609f405..22e3cd9 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -261,3 +261,8 @@ UnitTestCaseAction 1475074373958 TestRomanNumerals.java OK UnitTestSessionAction 1475074373959 TestRomanNumerals.java OK RefactoringAction 1475074376772 TestRomanNumerals.java ADD void testConvertInteger_XM_Throw_NumberFormatException()/2 METHOD EditAction 1475074398897 TestRomanNumerals.java 7315 51 81 30 +UnitTestCaseAction 1475074402388 TestRomanNumerals.java OK +UnitTestSessionAction 1475074402389 TestRomanNumerals.testConvertInteger_XD_Throw_NumberFormatException OK +RefactoringAction 1475074477598 RomanNumerals.java ADD boolean canBeRepeated FIELD +RefactoringAction 1475074481110 RomanNumerals.java RENAME canBeRepeated=>boolean canBeRepeated(char) METHOD +EditAction 1475074500630 RomanNumerals.java 2554 6 15 0 diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 41d279a..0d0e667 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -53,3 +53,4 @@ 1475074373964 test-addition 1 107 true 1475074373965 test-addition 1 107 true 1475074373966 test-addition 1 107 true +1475074402389 test-addition 1 25 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index ca09464..2e44886 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -16,3 +16,4 @@ 1475074220981 test-first 3 334 true 1475074258258 test-addition 1 31 true 1475074373959 test-addition 1 107 false +1475074402389 test-addition 1 25 true diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 18a6f35..3ed3575 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -16,3 +16,4 @@ 1475074220981 test-first 3 431 true 1475074258258 test-addition 1 37 true 1475074373959 test-addition 1 115 true +1475074402389 test-addition 1 28 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 3d71531..b92d86a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -10,9 +10,7 @@ public int convertToInteger(String romanNum) { } int retValue = 0; - int lastSub = 0; - int duplicates = 0; for (int i = 0; i < romanNum.length(); i++) { From fe64a85dd708844db7b5a1c373aaf8f72d266547 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:57:26 +0300 Subject: [PATCH 103/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 1 + tests/TestRomanNumerals.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 22e3cd9..94255cf 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -266,3 +266,4 @@ UnitTestSessionAction 1475074402389 TestRomanNumerals.testConvertInteger_XD_Thro RefactoringAction 1475074477598 RomanNumerals.java ADD boolean canBeRepeated FIELD RefactoringAction 1475074481110 RomanNumerals.java RENAME canBeRepeated=>boolean canBeRepeated(char) METHOD EditAction 1475074500630 RomanNumerals.java 2554 6 15 0 +EditAction 1475074646147 TestRomanNumerals.java 7314 51 81 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index cbbd84c..3ea68e1 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -46,7 +46,6 @@ public void testConvertInteger_IM_Throw_NumberFormatException() { mNumerals.convertToInteger("IM"); } - @Test(expected=NumberFormatException.class) public void testConvertInteger_XD_Throw_NumberFormatException() { mNumerals.convertToInteger("XD"); From 9153dabd53d31cdaffaee2eb27f1b3ba75557dd4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 28 Sep 2016 17:57:44 +0300 Subject: [PATCH 104/147] besouro automatic message --- .besouro/20160928170751466/actions.txt | 2 ++ .besouro/20160928170751466/besouroEpisodes.txt | 1 + .besouro/20160928170751466/randomHeuristicEpisodes.txt | 1 + .besouro/20160928170751466/zorroEpisodes.txt | 1 + 4 files changed, 5 insertions(+) diff --git a/.besouro/20160928170751466/actions.txt b/.besouro/20160928170751466/actions.txt index 94255cf..83455c1 100644 --- a/.besouro/20160928170751466/actions.txt +++ b/.besouro/20160928170751466/actions.txt @@ -267,3 +267,5 @@ RefactoringAction 1475074477598 RomanNumerals.java ADD boolean canBeRepeated FIE RefactoringAction 1475074481110 RomanNumerals.java RENAME canBeRepeated=>boolean canBeRepeated(char) METHOD EditAction 1475074500630 RomanNumerals.java 2554 6 15 0 EditAction 1475074646147 TestRomanNumerals.java 7314 51 81 30 +UnitTestCaseAction 1475074647788 TestRomanNumerals.java OK +UnitTestSessionAction 1475074647788 TestRomanNumerals.java OK diff --git a/.besouro/20160928170751466/besouroEpisodes.txt b/.besouro/20160928170751466/besouroEpisodes.txt index 0d0e667..dc7603f 100644 --- a/.besouro/20160928170751466/besouroEpisodes.txt +++ b/.besouro/20160928170751466/besouroEpisodes.txt @@ -54,3 +54,4 @@ 1475074373965 test-addition 1 107 true 1475074373966 test-addition 1 107 true 1475074402389 test-addition 1 25 true +1475074647788 refactoring 2A 170 true diff --git a/.besouro/20160928170751466/randomHeuristicEpisodes.txt b/.besouro/20160928170751466/randomHeuristicEpisodes.txt index 2e44886..058565b 100644 --- a/.besouro/20160928170751466/randomHeuristicEpisodes.txt +++ b/.besouro/20160928170751466/randomHeuristicEpisodes.txt @@ -17,3 +17,4 @@ 1475074258258 test-addition 1 31 true 1475074373959 test-addition 1 107 false 1475074402389 test-addition 1 25 true +1475074647788 refactoring 2A 170 false diff --git a/.besouro/20160928170751466/zorroEpisodes.txt b/.besouro/20160928170751466/zorroEpisodes.txt index 3ed3575..6a3e302 100644 --- a/.besouro/20160928170751466/zorroEpisodes.txt +++ b/.besouro/20160928170751466/zorroEpisodes.txt @@ -17,3 +17,4 @@ 1475074258258 test-addition 1 37 true 1475074373959 test-addition 1 115 true 1475074402389 test-addition 1 28 true +1475074647788 refactoring 2A 245 true From ca7e2f65bd5d6d64633a21c15a87b678a09773b0 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:29:59 +0300 Subject: [PATCH 105/147] besouro automatic message --- .besouro/20160928160354283/actions.txt | 2 ++ .besouro/20161005142856393/actions.txt | 3 +++ .besouro/20161005142856393/besouroEpisodes.txt | 0 .besouro/20161005142856393/disagreements.txt | 0 .besouro/20161005142856393/randomHeuristicEpisodes.txt | 0 .besouro/20161005142856393/userComments.txt | 0 .besouro/20161005142856393/zorroEpisodes.txt | 0 tests/TestRomanNumerals.java | 5 +++++ 8 files changed, 10 insertions(+) create mode 100644 .besouro/20161005142856393/actions.txt create mode 100644 .besouro/20161005142856393/besouroEpisodes.txt create mode 100644 .besouro/20161005142856393/disagreements.txt create mode 100644 .besouro/20161005142856393/randomHeuristicEpisodes.txt create mode 100644 .besouro/20161005142856393/userComments.txt create mode 100644 .besouro/20161005142856393/zorroEpisodes.txt diff --git a/.besouro/20160928160354283/actions.txt b/.besouro/20160928160354283/actions.txt index 5825cca..96968db 100644 --- a/.besouro/20160928160354283/actions.txt +++ b/.besouro/20160928160354283/actions.txt @@ -303,3 +303,5 @@ EditAction 1475070408271 RomanNumerals.java 981 3 7 0 UnitTestCaseAction 1475070440330 TestRomanNumerals.java OK UnitTestSessionAction 1475070440331 TestRomanNumerals.java OK EditAction 1475070481316 RomanNumerals.java 1032 3 7 0 +UnitTestCaseAction 1475070501664 TestRomanNumerals.java OK +UnitTestSessionAction 1475070501665 TestRomanNumerals.java OK diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt new file mode 100644 index 0000000..17ab230 --- /dev/null +++ b/.besouro/20161005142856393/actions.txt @@ -0,0 +1,3 @@ +FileOpenedAction 1475666936652 TestRomanNumerals.java 7314 51 81 30 +RefactoringAction 1475666986284 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() METHOD +EditAction 1475666997832 TestRomanNumerals.java 7444 52 82 30 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005142856393/disagreements.txt b/.besouro/20161005142856393/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005142856393/userComments.txt b/.besouro/20161005142856393/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 3ea68e1..9996ca1 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,6 +11,11 @@ public void initialize() { mNumerals = new RomanNumerals(); } + @Test + public void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() { + mNumerals.convertToInteger("XCC"); + } + @Test(expected=NumberFormatException.class) public void testConvertIntegerNull_Throw_NumberFormatException() { mNumerals.convertToInteger(null); From 6884cf6fada3f1255cb003335553ac758020067c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:30:04 +0300 Subject: [PATCH 106/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 17ab230..d3ae7be 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -1,3 +1,4 @@ FileOpenedAction 1475666936652 TestRomanNumerals.java 7314 51 81 30 RefactoringAction 1475666986284 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() METHOD EditAction 1475666997832 TestRomanNumerals.java 7444 52 82 30 +EditAction 1475667003237 TestRomanNumerals.java 7482 52 82 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 9996ca1..86e5646 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,7 +11,7 @@ public void initialize() { mNumerals = new RomanNumerals(); } - @Test + @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() { mNumerals.convertToInteger("XCC"); } From efb03a9d98efde83d2082ea93f8e384185a2f259 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:30:09 +0300 Subject: [PATCH 107/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index d3ae7be..ddec2ac 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -2,3 +2,4 @@ FileOpenedAction 1475666936652 TestRomanNumerals.java 7314 51 81 30 RefactoringAction 1475666986284 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() METHOD EditAction 1475666997832 TestRomanNumerals.java 7444 52 82 30 EditAction 1475667003237 TestRomanNumerals.java 7482 52 82 30 +EditAction 1475667008153 TestRomanNumerals.java 7488 52 82 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 86e5646..376de57 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -12,7 +12,7 @@ public void initialize() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_IllegalSubtraction_XXC_NumberFormatException() { + public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { mNumerals.convertToInteger("XCC"); } From f27012d0cc1e7552e96a0007b5efdff573e025a4 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:30:13 +0300 Subject: [PATCH 108/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index ddec2ac..33ab54e 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -3,3 +3,4 @@ RefactoringAction 1475666986284 TestRomanNumerals.java ADD void testConvertInteg EditAction 1475666997832 TestRomanNumerals.java 7444 52 82 30 EditAction 1475667003237 TestRomanNumerals.java 7482 52 82 30 EditAction 1475667008153 TestRomanNumerals.java 7488 52 82 30 +EditAction 1475667012640 TestRomanNumerals.java 7488 52 82 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 376de57..d87ca07 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -13,7 +13,7 @@ public void initialize() { @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { - mNumerals.convertToInteger("XCC"); + mNumerals.convertToInteger("XXC"); } @Test(expected=NumberFormatException.class) From bf60cf1f0b5b694a557dfede88c5c1ceb08bd409 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:31:37 +0300 Subject: [PATCH 109/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 33ab54e..bccde68 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -4,3 +4,6 @@ EditAction 1475666997832 TestRomanNumerals.java 7444 52 82 30 EditAction 1475667003237 TestRomanNumerals.java 7482 52 82 30 EditAction 1475667008153 TestRomanNumerals.java 7488 52 82 30 EditAction 1475667012640 TestRomanNumerals.java 7488 52 82 30 +UnitTestCaseAction 1475667016570 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475667016571 TestRomanNumerals.java FAIL +EditAction 1475667096912 RomanNumerals.java 2689 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index b92d86a..70b3a13 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -37,6 +37,9 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); + if (lastSub == getElementaryValue(romanNum.charAt(i))) { + throw new NumberFormatException("Illegal subtraction format"); + } if (diff > 2) { throw new NumberFormatException("Illegal subtraction format"); } From d37000545dbb39ae2dcc5fea19a8ff3dd4ec2c39 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:32:17 +0300 Subject: [PATCH 110/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index bccde68..0e9f535 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -7,3 +7,6 @@ EditAction 1475667012640 TestRomanNumerals.java 7488 52 82 30 UnitTestCaseAction 1475667016570 TestRomanNumerals.java FAIL UnitTestSessionAction 1475667016571 TestRomanNumerals.java FAIL EditAction 1475667096912 RomanNumerals.java 2689 6 15 0 +UnitTestCaseAction 1475667102036 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475667102037 TestRomanNumerals.java FAIL +EditAction 1475667135844 RomanNumerals.java 2697 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 70b3a13..782c5f1 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -38,8 +38,9 @@ public int convertToInteger(String romanNum) { - getElementaryIndex(romanNum.charAt(i)); if (lastSub == getElementaryValue(romanNum.charAt(i))) { - throw new NumberFormatException("Illegal subtraction format"); + throw new NumberFormatException("Illegal multiple subtractions"); } + if (diff > 2) { throw new NumberFormatException("Illegal subtraction format"); } From c51a64310155093b1a499e73c98817860e7309ba Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:32:48 +0300 Subject: [PATCH 111/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + src/RomanNumerals.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 0e9f535..8382491 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -10,3 +10,4 @@ EditAction 1475667096912 RomanNumerals.java 2689 6 15 0 UnitTestCaseAction 1475667102036 TestRomanNumerals.java FAIL UnitTestSessionAction 1475667102037 TestRomanNumerals.java FAIL EditAction 1475667135844 RomanNumerals.java 2697 6 15 0 +EditAction 1475667167201 RomanNumerals.java 2693 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 782c5f1..709a26c 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -30,6 +30,10 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Too many duplicate numeral characters."); } + if (lastSub == getElementaryValue(romanNum.charAt(i))) { + throw new NumberFormatException("Illegal multiple subtractions"); + } + if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { @@ -37,10 +41,6 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (lastSub == getElementaryValue(romanNum.charAt(i))) { - throw new NumberFormatException("Illegal multiple subtractions"); - } - if (diff > 2) { throw new NumberFormatException("Illegal subtraction format"); } From 7395a5b6122653f40b33299ce354c7335cc2e8ff Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:37:38 +0300 Subject: [PATCH 112/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 8382491..f0c4816 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -11,3 +11,6 @@ UnitTestCaseAction 1475667102036 TestRomanNumerals.java FAIL UnitTestSessionAction 1475667102037 TestRomanNumerals.java FAIL EditAction 1475667135844 RomanNumerals.java 2697 6 15 0 EditAction 1475667167201 RomanNumerals.java 2693 6 15 0 +UnitTestCaseAction 1475667170192 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475667170194 TestRomanNumerals.java FAIL +EditAction 1475667457688 RomanNumerals.java 2778 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 709a26c..565a13a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -30,7 +30,8 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Too many duplicate numeral characters."); } - if (lastSub == getElementaryValue(romanNum.charAt(i))) { + if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && + romanNum.charAt(i) == romanNum.charAt(i + 1)) { throw new NumberFormatException("Illegal multiple subtractions"); } From 21411a50ba63fe9a585c706b894810757004f01a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:51:19 +0300 Subject: [PATCH 113/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 9 +++++++++ src/RomanNumerals.java | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index f0c4816..6300c96 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -14,3 +14,12 @@ EditAction 1475667167201 RomanNumerals.java 2693 6 15 0 UnitTestCaseAction 1475667170192 TestRomanNumerals.java FAIL UnitTestSessionAction 1475667170194 TestRomanNumerals.java FAIL EditAction 1475667457688 RomanNumerals.java 2778 6 15 0 +UnitTestCaseAction 1475667460294 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475667460297 TestRomanNumerals.java FAIL +RefactoringAction 1475668263713 RomanNumerals.java REMOVE isOneTimeRepeatable(char) METHOD +RefactoringAction 1475668263715 RomanNumerals.java REMOVE getElementaryIndex(char) METHOD +RefactoringAction 1475668263717 RomanNumerals.java REMOVE isThreeTimesRepeatable(char) METHOD +RefactoringAction 1475668268734 RomanNumerals.java ADD boolean isOneTimeRepeatable(char) METHOD +RefactoringAction 1475668268736 RomanNumerals.java ADD boolean isThreeTimesRepeatable(char) METHOD +RefactoringAction 1475668268738 RomanNumerals.java ADD int getElementaryIndex(char) METHOD +EditAction 1475668278447 RomanNumerals.java 2554 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 565a13a..b92d86a 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -30,11 +30,6 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Too many duplicate numeral characters."); } - if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && - romanNum.charAt(i) == romanNum.charAt(i + 1)) { - throw new NumberFormatException("Illegal multiple subtractions"); - } - if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { From 376573412b03f2137aa654e40a54d952d15579b2 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:51:35 +0300 Subject: [PATCH 114/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 6300c96..da6c1fa 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -23,3 +23,6 @@ RefactoringAction 1475668268734 RomanNumerals.java ADD boolean isOneTimeRepeatab RefactoringAction 1475668268736 RomanNumerals.java ADD boolean isThreeTimesRepeatable(char) METHOD RefactoringAction 1475668268738 RomanNumerals.java ADD int getElementaryIndex(char) METHOD EditAction 1475668278447 RomanNumerals.java 2554 6 15 0 +UnitTestCaseAction 1475668281756 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668281757 TestRomanNumerals.java FAIL +EditAction 1475668294424 TestRomanNumerals.java 7450 52 82 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d87ca07..78a4213 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,7 +11,7 @@ public void initialize() { mNumerals = new RomanNumerals(); } - @Test(expected=NumberFormatException.class) + @Test public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { mNumerals.convertToInteger("XXC"); } From c65fe41ddfe6af28bbd3410dc4461cfe7dc7bf32 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:51:59 +0300 Subject: [PATCH 115/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ .besouro/20161005142856393/besouroEpisodes.txt | 11 +++++++++++ .../20161005142856393/randomHeuristicEpisodes.txt | 1 + .besouro/20161005142856393/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 3 ++- 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index da6c1fa..661792f 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -26,3 +26,6 @@ EditAction 1475668278447 RomanNumerals.java 2554 6 15 0 UnitTestCaseAction 1475668281756 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668281757 TestRomanNumerals.java FAIL EditAction 1475668294424 TestRomanNumerals.java 7450 52 82 30 +UnitTestCaseAction 1475668297772 TestRomanNumerals.java OK +UnitTestSessionAction 1475668297773 TestRomanNumerals.java OK +EditAction 1475668318164 TestRomanNumerals.java 7478 52 82 31 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index e69de29..c353ac5 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -0,0 +1,11 @@ +1475668297773 test-first 3 1361 true +1475668297774 test-first 3 1361 true +1475668297775 test-first 3 1361 true +1475668297776 test-first 3 1361 true +1475668297777 test-first 3 1361 true +1475668297778 test-first 3 1361 true +1475668297779 test-first 3 1361 true +1475668297780 test-first 3 1361 true +1475668297781 test-first 3 1361 true +1475668297782 test-first 3 1361 true +1475668297783 test-first 3 1361 true diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index e69de29..2bbc85c 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475668297773 test-first 3 1361 true diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index e69de29..2bbc85c 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -0,0 +1 @@ +1475668297773 test-first 3 1361 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 78a4213..13904db 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -13,7 +13,8 @@ public void initialize() { @Test public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { - mNumerals.convertToInteger("XXC"); + + assertEquals(123431241, mNumerals.convertToInteger("XXC")); } @Test(expected=NumberFormatException.class) From 18f3ae5cc70dc0426bae5d4373361fcc78154c87 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:52:07 +0300 Subject: [PATCH 116/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ tests/TestRomanNumerals.java | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 661792f..4b1328f 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -29,3 +29,6 @@ EditAction 1475668294424 TestRomanNumerals.java 7450 52 82 30 UnitTestCaseAction 1475668297772 TestRomanNumerals.java OK UnitTestSessionAction 1475668297773 TestRomanNumerals.java OK EditAction 1475668318164 TestRomanNumerals.java 7478 52 82 31 +UnitTestCaseAction 1475668320985 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668320986 TestRomanNumerals.java FAIL +EditAction 1475668327029 TestRomanNumerals.java 7488 52 82 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 13904db..d87ca07 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,10 +11,9 @@ public void initialize() { mNumerals = new RomanNumerals(); } - @Test + @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { - - assertEquals(123431241, mNumerals.convertToInteger("XXC")); + mNumerals.convertToInteger("XXC"); } @Test(expected=NumberFormatException.class) From fc90ee867cc102ff11e54e77303540cfbc118aef Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:55:30 +0300 Subject: [PATCH 117/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + src/RomanNumerals.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 4b1328f..5a25b42 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -32,3 +32,4 @@ EditAction 1475668318164 TestRomanNumerals.java 7478 52 82 31 UnitTestCaseAction 1475668320985 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668320986 TestRomanNumerals.java FAIL EditAction 1475668327029 TestRomanNumerals.java 7488 52 82 30 +EditAction 1475668529706 RomanNumerals.java 2649 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index b92d86a..937d412 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -37,8 +37,10 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); + if (lastSub != 0) + throw new NumberFormatException("Illegal multiple subtractions."); if (diff > 2) { - throw new NumberFormatException("Illegal subtraction format"); + throw new NumberFormatException("Illegal subtraction forma.t"); } lastSub = getElementaryValue(romanNum.charAt(i)); From 11451afa1fe25091e02d5c7c2cf92594c7983b4b Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:56:10 +0300 Subject: [PATCH 118/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 5a25b42..033eed3 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -33,3 +33,6 @@ UnitTestCaseAction 1475668320985 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668320986 TestRomanNumerals.java FAIL EditAction 1475668327029 TestRomanNumerals.java 7488 52 82 30 EditAction 1475668529706 RomanNumerals.java 2649 6 15 0 +UnitTestCaseAction 1475668532334 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668532335 TestRomanNumerals.java FAIL +EditAction 1475668569817 RomanNumerals.java 2646 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 937d412..d3831af 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -39,9 +39,9 @@ public int convertToInteger(String romanNum) { if (lastSub != 0) throw new NumberFormatException("Illegal multiple subtractions."); - if (diff > 2) { - throw new NumberFormatException("Illegal subtraction forma.t"); - } + + if (diff > 2) + throw new NumberFormatException("Illegal subtraction format."); lastSub = getElementaryValue(romanNum.charAt(i)); From fcfc932b86e580732d60220222822da964e8bb74 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:57:33 +0300 Subject: [PATCH 119/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 033eed3..07b9187 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -36,3 +36,4 @@ EditAction 1475668529706 RomanNumerals.java 2649 6 15 0 UnitTestCaseAction 1475668532334 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668532335 TestRomanNumerals.java FAIL EditAction 1475668569817 RomanNumerals.java 2646 6 15 0 +EditAction 1475668652898 RomanNumerals.java 2674 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d3831af..dbffa43 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -37,7 +37,7 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (lastSub != 0) + if (lastSub != 0 && (diff == 1 || diff == 2)) throw new NumberFormatException("Illegal multiple subtractions."); if (diff > 2) From 26c15f10b65feda063287b430338d642a15c6a7d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:57:50 +0300 Subject: [PATCH 120/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 07b9187..f8a7c9a 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -37,3 +37,6 @@ UnitTestCaseAction 1475668532334 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668532335 TestRomanNumerals.java FAIL EditAction 1475668569817 RomanNumerals.java 2646 6 15 0 EditAction 1475668652898 RomanNumerals.java 2674 6 15 0 +UnitTestCaseAction 1475668655357 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668655358 TestRomanNumerals.java FAIL +EditAction 1475668670065 RomanNumerals.java 2674 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index dbffa43..02eb2a9 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -37,7 +37,7 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (lastSub != 0 && (diff == 1 || diff == 2)) + if (lastSub == 0 && (diff == 1 || diff == 2)) throw new NumberFormatException("Illegal multiple subtractions."); if (diff > 2) From 3ee761c7d81010aadcb50bab8cdd41a657d74748 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 14:58:54 +0300 Subject: [PATCH 121/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index f8a7c9a..1e01383 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -40,3 +40,6 @@ EditAction 1475668652898 RomanNumerals.java 2674 6 15 0 UnitTestCaseAction 1475668655357 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668655358 TestRomanNumerals.java FAIL EditAction 1475668670065 RomanNumerals.java 2674 6 15 0 +UnitTestCaseAction 1475668672843 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668672845 TestRomanNumerals.java FAIL +EditAction 1475668733811 RomanNumerals.java 2646 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 02eb2a9..d3831af 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -37,7 +37,7 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (lastSub == 0 && (diff == 1 || diff == 2)) + if (lastSub != 0) throw new NumberFormatException("Illegal multiple subtractions."); if (diff > 2) From ca799a4ed180df7465f6971cda0c59f71cfaccab Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:08:38 +0300 Subject: [PATCH 122/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 1e01383..8c86f65 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -43,3 +43,6 @@ EditAction 1475668670065 RomanNumerals.java 2674 6 15 0 UnitTestCaseAction 1475668672843 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668672845 TestRomanNumerals.java FAIL EditAction 1475668733811 RomanNumerals.java 2646 6 15 0 +UnitTestCaseAction 1475668736456 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475668736457 TestRomanNumerals.java FAIL +EditAction 1475669318054 RomanNumerals.java 2831 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d3831af..09e4043 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -12,6 +12,7 @@ public int convertToInteger(String romanNum) { int retValue = 0; int lastSub = 0; int duplicates = 0; + int subtractables = 0; for (int i = 0; i < romanNum.length(); i++) { if (i > 0) { @@ -29,6 +30,13 @@ public int convertToInteger(String romanNum) { if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { throw new NumberFormatException("Too many duplicate numeral characters."); } + + if ((i < romanNum.length()) && + canBeSubtrahendElementaryValue(romanNum.charAt(i))) { + subtractables++; + } else { + subtractables = 0; + } if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && @@ -37,15 +45,15 @@ public int convertToInteger(String romanNum) { int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); - if (lastSub != 0) - throw new NumberFormatException("Illegal multiple subtractions."); - if (diff > 2) throw new NumberFormatException("Illegal subtraction format."); lastSub = getElementaryValue(romanNum.charAt(i)); } else { + if (subtractables > 1) + throw new NumberFormatException("Illegal multiple subtractions."); + retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; } From 52717874d46776a78b6e6725ec93395e88878395 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:09:42 +0300 Subject: [PATCH 123/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 8c86f65..b741bdc 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -46,3 +46,6 @@ EditAction 1475668733811 RomanNumerals.java 2646 6 15 0 UnitTestCaseAction 1475668736456 TestRomanNumerals.java FAIL UnitTestSessionAction 1475668736457 TestRomanNumerals.java FAIL EditAction 1475669318054 RomanNumerals.java 2831 6 16 0 +UnitTestCaseAction 1475669320861 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669320862 TestRomanNumerals.java FAIL +EditAction 1475669381136 RomanNumerals.java 2832 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 09e4043..98deaf1 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -49,10 +49,11 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Illegal subtraction format."); lastSub = getElementaryValue(romanNum.charAt(i)); - - } else { + if (subtractables > 1) throw new NumberFormatException("Illegal multiple subtractions."); + + } else { retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; From dc32df3c8a28364b98025fae359c61d5cfc79747 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:10:05 +0300 Subject: [PATCH 124/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index b741bdc..9cda77a 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -49,3 +49,6 @@ EditAction 1475669318054 RomanNumerals.java 2831 6 16 0 UnitTestCaseAction 1475669320861 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669320862 TestRomanNumerals.java FAIL EditAction 1475669381136 RomanNumerals.java 2832 6 16 0 +UnitTestCaseAction 1475669386278 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669386279 TestRomanNumerals.java FAIL +EditAction 1475669404679 RomanNumerals.java 2832 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 98deaf1..e9d1b3b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -50,7 +50,7 @@ public int convertToInteger(String romanNum) { lastSub = getElementaryValue(romanNum.charAt(i)); - if (subtractables > 1) + if (subtractables > 2) throw new NumberFormatException("Illegal multiple subtractions."); } else { From 9412130e3cd2771251470f7410521f7774d22d15 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:11:02 +0300 Subject: [PATCH 125/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 9cda77a..0533d8f 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -52,3 +52,6 @@ EditAction 1475669381136 RomanNumerals.java 2832 6 16 0 UnitTestCaseAction 1475669386278 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669386279 TestRomanNumerals.java FAIL EditAction 1475669404679 RomanNumerals.java 2832 6 16 0 +UnitTestCaseAction 1475669407835 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669407836 TestRomanNumerals.java FAIL +EditAction 1475669461835 RomanNumerals.java 2841 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e9d1b3b..dccd724 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -49,12 +49,10 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Illegal subtraction format."); lastSub = getElementaryValue(romanNum.charAt(i)); - - if (subtractables > 2) - throw new NumberFormatException("Illegal multiple subtractions."); } else { - + if (subtractables > 1 && lastSub != 0) + throw new NumberFormatException("Illegal multiple subtractions."); retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; } From 1fc4eef67df2288a11ac47ad72a4c19cf06d8f61 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:11:13 +0300 Subject: [PATCH 126/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + src/RomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 0533d8f..6d61a31 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -55,3 +55,4 @@ EditAction 1475669404679 RomanNumerals.java 2832 6 16 0 UnitTestCaseAction 1475669407835 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669407836 TestRomanNumerals.java FAIL EditAction 1475669461835 RomanNumerals.java 2841 6 16 0 +EditAction 1475669472439 RomanNumerals.java 2825 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index dccd724..8d81a46 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -51,7 +51,7 @@ public int convertToInteger(String romanNum) { lastSub = getElementaryValue(romanNum.charAt(i)); } else { - if (subtractables > 1 && lastSub != 0) + if (subtractables > 1) throw new NumberFormatException("Illegal multiple subtractions."); retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; From 4bc2a6a78547282840a363175d508266d9dc0384 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:11:33 +0300 Subject: [PATCH 127/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 6d61a31..72909f8 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -56,3 +56,6 @@ UnitTestCaseAction 1475669407835 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669407836 TestRomanNumerals.java FAIL EditAction 1475669461835 RomanNumerals.java 2841 6 16 0 EditAction 1475669472439 RomanNumerals.java 2825 6 16 0 +UnitTestCaseAction 1475669475064 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669475065 TestRomanNumerals.java FAIL +EditAction 1475669492952 RomanNumerals.java 2826 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 8d81a46..ebf9551 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -41,6 +41,9 @@ public int convertToInteger(String romanNum) { if ((i + 1 < romanNum.length()) && canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { + + if (subtractables > 1) + throw new NumberFormatException("Illegal multiple subtractions."); int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); @@ -51,8 +54,6 @@ public int convertToInteger(String romanNum) { lastSub = getElementaryValue(romanNum.charAt(i)); } else { - if (subtractables > 1) - throw new NumberFormatException("Illegal multiple subtractions."); retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; } From 483a68a44b73e21149d671bd62123e5c3f41670d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:15:02 +0300 Subject: [PATCH 128/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 72909f8..0d13351 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -59,3 +59,6 @@ EditAction 1475669472439 RomanNumerals.java 2825 6 16 0 UnitTestCaseAction 1475669475064 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669475065 TestRomanNumerals.java FAIL EditAction 1475669492952 RomanNumerals.java 2826 6 16 0 +UnitTestCaseAction 1475669495572 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669495573 TestRomanNumerals.java FAIL +EditAction 1475669701395 RomanNumerals.java 2826 6 16 0 From f8695734692ee260ef8b37293ccc5f035d45e7d6 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:22:29 +0300 Subject: [PATCH 129/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 13 +++++++++++++ src/RomanNumerals.java | 20 ++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 0d13351..9812157 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -62,3 +62,16 @@ EditAction 1475669492952 RomanNumerals.java 2826 6 16 0 UnitTestCaseAction 1475669495572 TestRomanNumerals.java FAIL UnitTestSessionAction 1475669495573 TestRomanNumerals.java FAIL EditAction 1475669701395 RomanNumerals.java 2826 6 16 0 +UnitTestCaseAction 1475669704985 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475669704987 TestRomanNumerals.java FAIL +RefactoringAction 1475670007575 RomanNumerals.java REMOVE isOneTimeRepeatable(char) METHOD +RefactoringAction 1475670007577 RomanNumerals.java REMOVE canBeSubtrahendElementaryValue(char) METHOD +RefactoringAction 1475670007579 RomanNumerals.java REMOVE getElementaryIndex(char) METHOD +RefactoringAction 1475670007580 RomanNumerals.java REMOVE isThreeTimesRepeatable(char) METHOD +RefactoringAction 1475670007582 RomanNumerals.java REMOVE getElementaryValue(char) METHOD +RefactoringAction 1475670010109 RomanNumerals.java ADD boolean canBeSubtrahendElementaryValue(char) METHOD +RefactoringAction 1475670010111 RomanNumerals.java ADD boolean isOneTimeRepeatable(char) METHOD +RefactoringAction 1475670010112 RomanNumerals.java ADD boolean isThreeTimesRepeatable(char) METHOD +RefactoringAction 1475670010114 RomanNumerals.java ADD int getElementaryValue(char) METHOD +RefactoringAction 1475670010116 RomanNumerals.java ADD int getElementaryIndex(char) METHOD +EditAction 1475670148237 RomanNumerals.java 2990 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index ebf9551..7dfcb63 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -14,7 +14,9 @@ public int convertToInteger(String romanNum) { int duplicates = 0; int subtractables = 0; - for (int i = 0; i < romanNum.length(); i++) { + // Refactoring: changing direction + for (int i = romanNum.length() - 1; i >= 0; i--) { + /* if (i > 0) { if (romanNum.charAt(i - 1) == romanNum.charAt(i)) { ++duplicates; @@ -42,9 +44,6 @@ public int convertToInteger(String romanNum) { canBeSubtrahendElementaryValue(romanNum.charAt(i)) && getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { - if (subtractables > 1) - throw new NumberFormatException("Illegal multiple subtractions."); - int diff = getElementaryIndex(romanNum.charAt(i + 1)) - getElementaryIndex(romanNum.charAt(i)); @@ -57,6 +56,19 @@ public int convertToInteger(String romanNum) { retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; lastSub = 0; } + */ + + char c0 = romanNum.charAt(i); + + int subtrahend = 0; + + for (int j = i - 1; j >= 0; j--) { + c1 = romanNum.charAt(j); + + if (canBeSubtrahendElementaryValue(c1)) + subtrahend = 0; + } + } return retValue; From 6d637c1ca574d36091107dd1fc4a7d43ff9055fd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:26:26 +0300 Subject: [PATCH 130/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 7 +++++++ src/RomanNumerals.java | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 9812157..f9daa62 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -75,3 +75,10 @@ RefactoringAction 1475670010112 RomanNumerals.java ADD boolean isThreeTimesRepea RefactoringAction 1475670010114 RomanNumerals.java ADD int getElementaryValue(char) METHOD RefactoringAction 1475670010116 RomanNumerals.java ADD int getElementaryIndex(char) METHOD EditAction 1475670148237 RomanNumerals.java 2990 6 16 0 +CompilationAction 1475670150255 RomanNumerals.java +CompilationAction 1475670296909 RomanNumerals.java +UnitTestCaseAction 1475670298220 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670298221 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670371307 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670371308 TestRomanNumerals.java FAIL +EditAction 1475670385728 RomanNumerals.java 3238 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 7dfcb63..d6cbe6e 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -63,12 +63,17 @@ public int convertToInteger(String romanNum) { int subtrahend = 0; for (int j = i - 1; j >= 0; j--) { - c1 = romanNum.charAt(j); - - if (canBeSubtrahendElementaryValue(c1)) - subtrahend = 0; + char c1 = romanNum.charAt(j); + if (canBeSubtrahendElementaryValue(c1) && + getElementaryValue(c0) > getElementaryValue(c1)) { + if (subtrahend != 0) + throw new NumberFormatException("Illegal multiple subtractions."); + subtrahend = getElementaryValue(c1); + } + break; } + retValue += getElementaryValue(c0) - subtrahend; } return retValue; From 5a51203392215db34aeb8cccf4306632ec5dde87 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:31:49 +0300 Subject: [PATCH 131/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 13 +++++++++++++ src/RomanNumerals.java | 13 ++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index f9daa62..67435fb 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -82,3 +82,16 @@ UnitTestSessionAction 1475670298221 TestRomanNumerals.java FAIL UnitTestCaseAction 1475670371307 TestRomanNumerals.java FAIL UnitTestSessionAction 1475670371308 TestRomanNumerals.java FAIL EditAction 1475670385728 RomanNumerals.java 3238 6 16 0 +UnitTestCaseAction 1475670388479 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670388480 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670417904 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670417906 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670424803 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670424804 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670455148 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670455150 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670579540 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670579541 TestRomanNumerals.java FAIL +UnitTestCaseAction 1475670646665 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670646666 TestRomanNumerals.java FAIL +EditAction 1475670708634 RomanNumerals.java 3469 6 16 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index d6cbe6e..22d4c09 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -64,13 +64,20 @@ public int convertToInteger(String romanNum) { for (int j = i - 1; j >= 0; j--) { char c1 = romanNum.charAt(j); - if (canBeSubtrahendElementaryValue(c1) && - getElementaryValue(c0) > getElementaryValue(c1)) { + if (canBeSubtrahendElementaryValue(c1) && getElementaryValue(c0) > getElementaryValue(c1)) { + int diff = getElementaryIndex(c0) - getElementaryIndex(c1); + + if (diff > 2) + throw new NumberFormatException("Illegal subtraction format."); + if (subtrahend != 0) throw new NumberFormatException("Illegal multiple subtractions."); + subtrahend = getElementaryValue(c1); + i--; + } else if (!canBeSubtrahendElementaryValue(c1)) { + break; } - break; } retValue += getElementaryValue(c0) - subtrahend; From 1a8b2853fdac2fc6222b2eb5c83e24082ee38e96 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:34:15 +0300 Subject: [PATCH 132/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 + .../20161005142856393/besouroEpisodes.txt | 88 +++++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005142856393/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 38 ++------ 5 files changed, 101 insertions(+), 30 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 67435fb..3d76d6e 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -95,3 +95,6 @@ UnitTestSessionAction 1475670579541 TestRomanNumerals.java FAIL UnitTestCaseAction 1475670646665 TestRomanNumerals.java FAIL UnitTestSessionAction 1475670646666 TestRomanNumerals.java FAIL EditAction 1475670708634 RomanNumerals.java 3469 6 16 0 +UnitTestCaseAction 1475670847428 TestRomanNumerals.java OK +UnitTestSessionAction 1475670847429 TestRomanNumerals.java OK +EditAction 1475670854590 RomanNumerals.java 2821 6 18 0 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index c353ac5..048c015 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -9,3 +9,91 @@ 1475668297781 test-first 3 1361 true 1475668297782 test-first 3 1361 true 1475668297783 test-first 3 1361 true +1475670847429 test-first 3 2529 true +1475670847430 test-first 3 2529 true +1475670847431 test-first 3 2529 true +1475670847432 test-first 3 2529 true +1475670847433 test-first 3 2529 true +1475670847434 test-first 3 2529 true +1475670847435 test-first 3 2529 true +1475670847436 test-first 3 2529 true +1475670847437 test-first 3 2529 true +1475670847438 test-first 3 2529 true +1475670847439 test-first 3 2529 true +1475670847440 test-first 3 2529 true +1475670847441 test-first 3 2529 true +1475670847442 test-first 3 2529 true +1475670847443 test-first 3 2529 true +1475670847444 test-first 3 2529 true +1475670847445 test-first 3 2529 true +1475670847446 test-first 3 2529 true +1475670847447 test-first 3 2529 true +1475670847448 test-first 3 2529 true +1475670847449 test-first 3 2529 true +1475670847450 test-first 3 2529 true +1475670847451 test-first 3 2529 true +1475670847452 test-first 3 2529 true +1475670847453 test-first 3 2529 true +1475670847454 test-first 3 2529 true +1475670847455 test-first 3 2529 true +1475670847456 test-first 3 2529 true +1475670847457 test-first 3 2529 true +1475670847458 test-first 3 2529 true +1475670847459 test-first 3 2529 true +1475670847460 test-first 3 2529 true +1475670847461 test-first 3 2529 true +1475670847462 test-first 3 2529 true +1475670847463 test-first 3 2529 true +1475670847464 test-first 3 2529 true +1475670847465 test-first 3 2529 true +1475670847466 test-first 3 2529 true +1475670847467 test-first 3 2529 true +1475670847468 test-first 3 2529 true +1475670847469 test-first 3 2529 true +1475670847470 test-first 3 2529 true +1475670847471 test-first 3 2529 true +1475670847472 test-first 3 2529 true +1475670847473 test-first 3 2529 true +1475670847474 test-first 3 2529 true +1475670847475 test-first 3 2529 true +1475670847476 test-first 3 2529 true +1475670847477 test-first 3 2529 true +1475670847478 test-first 3 2529 true +1475670847479 test-first 3 2529 true +1475670847480 test-first 3 2529 true +1475670847481 test-first 3 2529 true +1475670847482 test-first 3 2529 true +1475670847483 test-first 3 2529 true +1475670847484 test-first 3 2529 true +1475670847485 test-first 3 2529 true +1475670847486 test-first 3 2529 true +1475670847487 test-first 3 2529 true +1475670847488 test-first 3 2529 true +1475670847489 test-first 3 2529 true +1475670847490 test-first 3 2529 true +1475670847491 test-first 3 2529 true +1475670847492 test-first 3 2529 true +1475670847493 test-first 3 2529 true +1475670847494 test-first 3 2529 true +1475670847495 test-first 3 2529 true +1475670847496 test-first 3 2529 true +1475670847497 test-first 3 2529 true +1475670847498 test-first 3 2529 true +1475670847499 test-first 3 2529 true +1475670847500 test-first 3 2529 true +1475670847501 test-first 3 2529 true +1475670847502 test-first 3 2529 true +1475670847503 test-first 3 2529 true +1475670847504 test-first 3 2529 true +1475670847505 test-first 3 2529 true +1475670847506 test-first 3 2529 true +1475670847507 test-first 3 2529 true +1475670847508 test-first 3 2529 true +1475670847509 test-first 3 2529 true +1475670847510 test-first 3 2529 true +1475670847511 test-first 3 2529 true +1475670847512 test-first 3 2529 true +1475670847513 test-first 3 2529 true +1475670847514 test-first 3 2529 true +1475670847515 test-first 3 2529 true +1475670847516 test-first 3 2529 true diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index 2bbc85c..a1e6212 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -1 +1,2 @@ 1475668297773 test-first 3 1361 true +1475670847429 test-first 3 2529 true diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index 2bbc85c..de15ee3 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -1 +1,2 @@ 1475668297773 test-first 3 1361 true +1475670847429 test-first 3 2549 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 22d4c09..34c2f84 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -14,9 +14,9 @@ public int convertToInteger(String romanNum) { int duplicates = 0; int subtractables = 0; - // Refactoring: changing direction - for (int i = romanNum.length() - 1; i >= 0; i--) { - /* + int prev = 0; + + for (int i = 01; i < romanNum.length(); i++) { if (i > 0) { if (romanNum.charAt(i - 1) == romanNum.charAt(i)) { ++duplicates; @@ -24,7 +24,7 @@ public int convertToInteger(String romanNum) { duplicates = 0; } } - + if (duplicates >= 1 && isOneTimeRepeatable(romanNum.charAt(i))) { throw new NumberFormatException("Too many duplicate numeral characters."); } @@ -32,32 +32,10 @@ public int convertToInteger(String romanNum) { if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { throw new NumberFormatException("Too many duplicate numeral characters."); } - - if ((i < romanNum.length()) && - canBeSubtrahendElementaryValue(romanNum.charAt(i))) { - subtractables++; - } else { - subtractables = 0; - } - - if ((i + 1 < romanNum.length()) && - canBeSubtrahendElementaryValue(romanNum.charAt(i)) && - getElementaryValue(romanNum.charAt(i)) < getElementaryValue(romanNum.charAt(i + 1))) { - - int diff = getElementaryIndex(romanNum.charAt(i + 1)) - - getElementaryIndex(romanNum.charAt(i)); - - if (diff > 2) - throw new NumberFormatException("Illegal subtraction format."); - - lastSub = getElementaryValue(romanNum.charAt(i)); - - } else { - retValue += getElementaryValue(romanNum.charAt(i)) - lastSub; - lastSub = 0; - } - */ - + } + + // Refactoring: changing direction + for (int i = romanNum.length() - 1; i >= 0; i--) { char c0 = romanNum.charAt(i); int subtrahend = 0; From 46fd8ef37aff7cb609fd9fe8006da204d2e9608f Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:35:20 +0300 Subject: [PATCH 133/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 3d76d6e..6cdd1bf 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -98,3 +98,8 @@ EditAction 1475670708634 RomanNumerals.java 3469 6 16 0 UnitTestCaseAction 1475670847428 TestRomanNumerals.java OK UnitTestSessionAction 1475670847429 TestRomanNumerals.java OK EditAction 1475670854590 RomanNumerals.java 2821 6 18 0 +RefactoringAction 1475670888079 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475670892100 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException()/2=>void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException() METHOD +RefactoringAction 1475670895622 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_V_Throw_NumberFormatException() METHOD +RefactoringAction 1475670918647 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_V_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException() METHOD +EditAction 1475670919650 TestRomanNumerals.java 7661 53 83 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d87ca07..822a7e2 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -10,6 +10,12 @@ public class TestRomanNumerals { public void initialize() { mNumerals = new RomanNumerals(); } + + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException() { + mNumerals.convertToInteger("VX"); + } @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_XXC_Throw_NumberFormatException() { From 1069111b596e5bb1891ad172302767b4dc3986cd Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:37:57 +0300 Subject: [PATCH 134/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 6 ++++++ src/RomanNumerals.java | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 6cdd1bf..2990e28 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -103,3 +103,9 @@ RefactoringAction 1475670892100 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475670895622 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_V_Throw_NumberFormatException() METHOD RefactoringAction 1475670918647 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_V_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException() METHOD EditAction 1475670919650 TestRomanNumerals.java 7661 53 83 30 +UnitTestCaseAction 1475670922911 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475670922912 TestRomanNumerals.java FAIL +RefactoringAction 1475670944723 RomanNumerals.java ADD boolean isOneTimeRepeatable(char)/2 METHOD +RefactoringAction 1475670948238 RomanNumerals.java RENAME isOneTimeRepeatable(char)/2=>boolean canBe(char) METHOD +RefactoringAction 1475670958754 RomanNumerals.java REMOVE canBe(char) METHOD +EditAction 1475671077114 RomanNumerals.java 2955 6 18 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 34c2f84..0e91a7b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -54,6 +54,9 @@ public int convertToInteger(String romanNum) { subtrahend = getElementaryValue(c1); i--; } else if (!canBeSubtrahendElementaryValue(c1)) { + if (getElementaryValue(c0) > getElementaryValue(c1)) { + throw new NumberFormatException("Illegal subtraction format."); + } break; } } @@ -84,7 +87,6 @@ private boolean isOneTimeRepeatable(char character) { } return false; - } private boolean isThreeTimesRepeatable(char character) { From b6fc7c34186979f3b5addf80a5a29d71a0e3b1ff Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:38:08 +0300 Subject: [PATCH 135/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 1 + src/RomanNumerals.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 2990e28..c8756f3 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -109,3 +109,4 @@ RefactoringAction 1475670944723 RomanNumerals.java ADD boolean isOneTimeRepeatab RefactoringAction 1475670948238 RomanNumerals.java RENAME isOneTimeRepeatable(char)/2=>boolean canBe(char) METHOD RefactoringAction 1475670958754 RomanNumerals.java REMOVE canBe(char) METHOD EditAction 1475671077114 RomanNumerals.java 2955 6 18 0 +EditAction 1475671087365 RomanNumerals.java 2961 6 18 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 0e91a7b..e14eef3 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -54,9 +54,10 @@ public int convertToInteger(String romanNum) { subtrahend = getElementaryValue(c1); i--; } else if (!canBeSubtrahendElementaryValue(c1)) { - if (getElementaryValue(c0) > getElementaryValue(c1)) { + if (getElementaryValue(c1) > getElementaryValue(c0)) { throw new NumberFormatException("Illegal subtraction format."); } + break; } } From 26b455f92f22abadf6a08620e5491cb9958925a1 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:38:18 +0300 Subject: [PATCH 136/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index c8756f3..7fec19a 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -110,3 +110,6 @@ RefactoringAction 1475670948238 RomanNumerals.java RENAME isOneTimeRepeatable(ch RefactoringAction 1475670958754 RomanNumerals.java REMOVE canBe(char) METHOD EditAction 1475671077114 RomanNumerals.java 2955 6 18 0 EditAction 1475671087365 RomanNumerals.java 2961 6 18 0 +UnitTestCaseAction 1475671090115 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475671090116 TestRomanNumerals.java FAIL +EditAction 1475671098013 RomanNumerals.java 2961 6 18 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index e14eef3..cd70e34 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -54,7 +54,7 @@ public int convertToInteger(String romanNum) { subtrahend = getElementaryValue(c1); i--; } else if (!canBeSubtrahendElementaryValue(c1)) { - if (getElementaryValue(c1) > getElementaryValue(c0)) { + if (getElementaryValue(c1) < getElementaryValue(c0)) { throw new NumberFormatException("Illegal subtraction format."); } From 98b0a181874a010f93f7bfc5b5c3a2ddbcaadf3d Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:39:45 +0300 Subject: [PATCH 137/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 9 +++++++++ .besouro/20161005142856393/besouroEpisodes.txt | 3 +++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161005142856393/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 18 +++++------------- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 7fec19a..32b3889 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -113,3 +113,12 @@ EditAction 1475671087365 RomanNumerals.java 2961 6 18 0 UnitTestCaseAction 1475671090115 TestRomanNumerals.java FAIL UnitTestSessionAction 1475671090116 TestRomanNumerals.java FAIL EditAction 1475671098013 RomanNumerals.java 2961 6 18 0 +UnitTestCaseAction 1475671101951 TestRomanNumerals.java OK +UnitTestSessionAction 1475671101952 TestRomanNumerals.java OK +RefactoringAction 1475671142030 RomanNumerals.java ADD int i FIELD +RefactoringAction 1475671143052 RomanNumerals.java REMOVE i FIELD +RefactoringAction 1475671150603 RomanNumerals.java ADD int i FIELD +RefactoringAction 1475671152126 RomanNumerals.java REMOVE i FIELD +RefactoringAction 1475671156677 RomanNumerals.java ADD int i FIELD +RefactoringAction 1475671182849 RomanNumerals.java REMOVE i FIELD +EditAction 1475671184211 RomanNumerals.java 2902 6 18 0 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index 048c015..a94b7cb 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -97,3 +97,6 @@ 1475670847514 test-first 3 2529 true 1475670847515 test-first 3 2529 true 1475670847516 test-first 3 2529 true +1475671101952 test-first 3 247 true +1475671101953 test-first 3 247 true +1475671101954 test-last 1 247 false diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index a1e6212..a91473b 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -1,2 +1,3 @@ 1475668297773 test-first 3 1361 true 1475670847429 test-first 3 2529 true +1475671101952 test-first 3 247 true diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index de15ee3..93ba67c 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -1,2 +1,3 @@ 1475668297773 test-first 3 1361 true 1475670847429 test-first 3 2549 true +1475671101952 test-first 3 254 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index cd70e34..faa8318 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -17,21 +17,14 @@ public int convertToInteger(String romanNum) { int prev = 0; for (int i = 01; i < romanNum.length(); i++) { - if (i > 0) { - if (romanNum.charAt(i - 1) == romanNum.charAt(i)) { - ++duplicates; - } else { - duplicates = 0; - } - } + if (i > 0) + duplicates = (romanNum.charAt(i - 1) == romanNum.charAt(i)) ? duplicates + 1 : 0; - if (duplicates >= 1 && isOneTimeRepeatable(romanNum.charAt(i))) { + if (duplicates >= 1 && isOneTimeRepeatable(romanNum.charAt(i))) throw new NumberFormatException("Too many duplicate numeral characters."); - } - if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) { + if (duplicates >= 3 && isThreeTimesRepeatable(romanNum.charAt(i))) throw new NumberFormatException("Too many duplicate numeral characters."); - } } // Refactoring: changing direction @@ -54,9 +47,8 @@ public int convertToInteger(String romanNum) { subtrahend = getElementaryValue(c1); i--; } else if (!canBeSubtrahendElementaryValue(c1)) { - if (getElementaryValue(c1) < getElementaryValue(c0)) { + if (getElementaryValue(c1) < getElementaryValue(c0)) throw new NumberFormatException("Illegal subtraction format."); - } break; } From e51cbf752d98c99cc356f80e7a92c4b05c5c0781 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:42:06 +0300 Subject: [PATCH 138/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 9 +++++++++ .besouro/20161005142856393/besouroEpisodes.txt | 2 ++ .../20161005142856393/randomHeuristicEpisodes.txt | 2 ++ .besouro/20161005142856393/zorroEpisodes.txt | 2 ++ src/RomanNumerals.java | 11 ++--------- tests/TestRomanNumerals.java | 9 +++++++++ 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 32b3889..81e3853 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -122,3 +122,12 @@ RefactoringAction 1475671152126 RomanNumerals.java REMOVE i FIELD RefactoringAction 1475671156677 RomanNumerals.java ADD int i FIELD RefactoringAction 1475671182849 RomanNumerals.java REMOVE i FIELD EditAction 1475671184211 RomanNumerals.java 2902 6 18 0 +UnitTestCaseAction 1475671187047 TestRomanNumerals.java OK +UnitTestSessionAction 1475671187048 TestRomanNumerals.java OK +UnitTestCaseAction 1475671220424 TestRomanNumerals.java OK +UnitTestSessionAction 1475671220425 TestRomanNumerals.java OK +RefactoringAction 1475671301703 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475671318254 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException()/2=>void testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException() METHOD +RefactoringAction 1475671320273 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()/2 METHOD +RefactoringAction 1475671323820 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()/2=>void testConvertInteger_IllegalSubtraction_DX_Throw_NumberFormatException() METHOD +EditAction 1475671326195 TestRomanNumerals.java 8003 55 85 30 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index a94b7cb..763d835 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -100,3 +100,5 @@ 1475671101952 test-first 3 247 true 1475671101953 test-first 3 247 true 1475671101954 test-last 1 247 false +1475671187048 refactoring 2A 45 true +1475671220425 regression 1 0 true diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index a91473b..0a38709 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -1,3 +1,5 @@ 1475668297773 test-first 3 1361 true 1475670847429 test-first 3 2529 true 1475671101952 test-first 3 247 true +1475671187048 refactoring 2A 45 false +1475671220425 regression 1 0 true diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index 93ba67c..11824aa 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -1,3 +1,5 @@ 1475668297773 test-first 3 1361 true 1475670847429 test-first 3 2549 true 1475671101952 test-first 3 254 true +1475671187048 refactoring 2A 85 true +1475671220425 regression 1 33 true diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index faa8318..bdcc861 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,20 +1,14 @@ public class RomanNumerals { public int convertToInteger(String romanNum) { - if (romanNum == null) { + if (romanNum == null) throw new NumberFormatException("Null roman numeral."); - } - if (romanNum.isEmpty()) { + if (romanNum.isEmpty()) throw new NumberFormatException("Empty roman numeral."); - } int retValue = 0; - int lastSub = 0; int duplicates = 0; - int subtractables = 0; - - int prev = 0; for (int i = 01; i < romanNum.length(); i++) { if (i > 0) @@ -27,7 +21,6 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Too many duplicate numeral characters."); } - // Refactoring: changing direction for (int i = romanNum.length() - 1; i >= 0; i--) { char c0 = romanNum.charAt(i); diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 822a7e2..2b251e5 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,6 +11,15 @@ public void initialize() { mNumerals = new RomanNumerals(); } + @Test(expected=NumberFormatException.class) + public void testConvertInteger_IllegalSubtraction_DX_Throw_NumberFormatException() { + mNumerals.convertToInteger("DX"); + } + + @Test(expected=NumberFormatException.class) + public void testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException() { + mNumerals.convertToInteger("LX"); + } @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_VX_Throw_NumberFormatException() { From 11025493783adaddfff6c3b6193f6a09b19ab678 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:42:28 +0300 Subject: [PATCH 139/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ tests/TestRomanNumerals.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 81e3853..ab09412 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -131,3 +131,6 @@ RefactoringAction 1475671318254 TestRomanNumerals.java RENAME testConvertInteger RefactoringAction 1475671320273 TestRomanNumerals.java ADD void testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()/2 METHOD RefactoringAction 1475671323820 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()/2=>void testConvertInteger_IllegalSubtraction_DX_Throw_NumberFormatException() METHOD EditAction 1475671326195 TestRomanNumerals.java 8003 55 85 30 +UnitTestCaseAction 1475671332570 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475671332570 TestRomanNumerals.java FAIL +EditAction 1475671347720 TestRomanNumerals.java 8003 55 85 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2b251e5..56a71ad 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -12,8 +12,8 @@ public void initialize() { } @Test(expected=NumberFormatException.class) - public void testConvertInteger_IllegalSubtraction_DX_Throw_NumberFormatException() { - mNumerals.convertToInteger("DX"); + public void testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException() { + mNumerals.convertToInteger("DM"); } @Test(expected=NumberFormatException.class) From 00cdbfbca8fffccccfab9a63f57eeca002204fdb Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:42:52 +0300 Subject: [PATCH 140/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 4 ++++ .besouro/20161005142856393/besouroEpisodes.txt | 4 ++++ .besouro/20161005142856393/randomHeuristicEpisodes.txt | 1 + .besouro/20161005142856393/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 4 ++-- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index ab09412..85ec18e 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -134,3 +134,7 @@ EditAction 1475671326195 TestRomanNumerals.java 8003 55 85 30 UnitTestCaseAction 1475671332570 TestRomanNumerals.java FAIL UnitTestSessionAction 1475671332570 TestRomanNumerals.java FAIL EditAction 1475671347720 TestRomanNumerals.java 8003 55 85 30 +UnitTestCaseAction 1475671350155 TestRomanNumerals.java OK +UnitTestSessionAction 1475671350156 TestRomanNumerals.testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException OK +RefactoringAction 1475671370369 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_LC_Throw_NumberFormatException() METHOD +EditAction 1475671371660 TestRomanNumerals.java 8003 55 85 30 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index 763d835..9639673 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -102,3 +102,7 @@ 1475671101954 test-last 1 247 false 1475671187048 refactoring 2A 45 true 1475671220425 regression 1 0 true +1475671350156 test-addition 2 48 true +1475671350157 test-addition 1 48 true +1475671350158 test-addition 2 48 true +1475671350159 test-addition 1 48 true diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index 0a38709..e3261b1 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -3,3 +3,4 @@ 1475671101952 test-first 3 247 true 1475671187048 refactoring 2A 45 false 1475671220425 regression 1 0 true +1475671350156 test-addition 2 48 true diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index 11824aa..58a86ef 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -3,3 +3,4 @@ 1475671101952 test-first 3 254 true 1475671187048 refactoring 2A 85 true 1475671220425 regression 1 33 true +1475671350156 test-addition 2 129 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 56a71ad..1344d4b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -17,8 +17,8 @@ public void testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException } @Test(expected=NumberFormatException.class) - public void testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException() { - mNumerals.convertToInteger("LX"); + public void testConvertInteger_IllegalSubtraction_LC_Throw_NumberFormatException() { + mNumerals.convertToInteger("LC"); } @Test(expected=NumberFormatException.class) From de8355952c97c5530f2fae2ac1f48c64d3362d20 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:42:58 +0300 Subject: [PATCH 141/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ .besouro/20161005142856393/besouroEpisodes.txt | 4 ++++ .besouro/20161005142856393/randomHeuristicEpisodes.txt | 1 + .besouro/20161005142856393/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index 85ec18e..f42e3ca 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -138,3 +138,6 @@ UnitTestCaseAction 1475671350155 TestRomanNumerals.java OK UnitTestSessionAction 1475671350156 TestRomanNumerals.testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException OK RefactoringAction 1475671370369 TestRomanNumerals.java RENAME testConvertInteger_IllegalSubtraction_LX_Throw_NumberFormatException()=>void testConvertInteger_IllegalSubtraction_LC_Throw_NumberFormatException() METHOD EditAction 1475671371660 TestRomanNumerals.java 8003 55 85 30 +UnitTestCaseAction 1475671373909 TestRomanNumerals.java OK +UnitTestSessionAction 1475671373910 TestRomanNumerals.java OK +EditAction 1475671377579 TestRomanNumerals.java 8003 55 85 30 diff --git a/.besouro/20161005142856393/besouroEpisodes.txt b/.besouro/20161005142856393/besouroEpisodes.txt index 9639673..82099f7 100644 --- a/.besouro/20161005142856393/besouroEpisodes.txt +++ b/.besouro/20161005142856393/besouroEpisodes.txt @@ -106,3 +106,7 @@ 1475671350157 test-addition 1 48 true 1475671350158 test-addition 2 48 true 1475671350159 test-addition 1 48 true +1475671373910 refactoring 1B 3 true +1475671373911 refactoring 3 3 true +1475671373912 refactoring 2B 3 true +1475671373913 regression 1 3 true diff --git a/.besouro/20161005142856393/randomHeuristicEpisodes.txt b/.besouro/20161005142856393/randomHeuristicEpisodes.txt index e3261b1..38cc6b5 100644 --- a/.besouro/20161005142856393/randomHeuristicEpisodes.txt +++ b/.besouro/20161005142856393/randomHeuristicEpisodes.txt @@ -4,3 +4,4 @@ 1475671187048 refactoring 2A 45 false 1475671220425 regression 1 0 true 1475671350156 test-addition 2 48 true +1475671373910 refactoring 1B 3 false diff --git a/.besouro/20161005142856393/zorroEpisodes.txt b/.besouro/20161005142856393/zorroEpisodes.txt index 58a86ef..da1e548 100644 --- a/.besouro/20161005142856393/zorroEpisodes.txt +++ b/.besouro/20161005142856393/zorroEpisodes.txt @@ -4,3 +4,4 @@ 1475671187048 refactoring 2A 85 true 1475671220425 regression 1 33 true 1475671350156 test-addition 2 129 true +1475671373910 refactoring 1B 23 true diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 1344d4b..97e44a6 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,7 +18,7 @@ public void testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_LC_Throw_NumberFormatException() { - mNumerals.convertToInteger("LC"); + mNumerals.convertToInteger("CL"); } @Test(expected=NumberFormatException.class) From 937a82356c25aa41d43bb67eb6fa16f782457e7e Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:43:02 +0300 Subject: [PATCH 142/147] besouro automatic message --- .besouro/20161005142856393/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161005142856393/actions.txt b/.besouro/20161005142856393/actions.txt index f42e3ca..db8f024 100644 --- a/.besouro/20161005142856393/actions.txt +++ b/.besouro/20161005142856393/actions.txt @@ -141,3 +141,6 @@ EditAction 1475671371660 TestRomanNumerals.java 8003 55 85 30 UnitTestCaseAction 1475671373909 TestRomanNumerals.java OK UnitTestSessionAction 1475671373910 TestRomanNumerals.java OK EditAction 1475671377579 TestRomanNumerals.java 8003 55 85 30 +UnitTestCaseAction 1475671379817 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475671379818 TestRomanNumerals.java FAIL +EditAction 1475671381748 TestRomanNumerals.java 8003 55 85 30 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 97e44a6..1344d4b 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,7 +18,7 @@ public void testConvertInteger_IllegalSubtraction_DM_Throw_NumberFormatException @Test(expected=NumberFormatException.class) public void testConvertInteger_IllegalSubtraction_LC_Throw_NumberFormatException() { - mNumerals.convertToInteger("CL"); + mNumerals.convertToInteger("LC"); } @Test(expected=NumberFormatException.class) From ff731a94be7f9bb95b194e47f03a8ccc58405f3a Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:43:26 +0300 Subject: [PATCH 143/147] besouro automatic message From e99632e2c96dff3a520be595e459bdf73fa9d2e5 Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:43:52 +0300 Subject: [PATCH 144/147] besouro automatic message From 0d386aaa732966f8a88e904b197fffcf2fec62aa Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:45:48 +0300 Subject: [PATCH 145/147] besouro automatic message --- .besouro/20161005154353371/actions.txt | 2 ++ .besouro/20161005154353371/besouroEpisodes.txt | 0 .besouro/20161005154353371/disagreements.txt | 0 .besouro/20161005154353371/randomHeuristicEpisodes.txt | 0 .besouro/20161005154353371/userComments.txt | 0 .besouro/20161005154353371/zorroEpisodes.txt | 0 src/RomanNumerals.java | 3 +-- 7 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .besouro/20161005154353371/actions.txt create mode 100644 .besouro/20161005154353371/besouroEpisodes.txt create mode 100644 .besouro/20161005154353371/disagreements.txt create mode 100644 .besouro/20161005154353371/randomHeuristicEpisodes.txt create mode 100644 .besouro/20161005154353371/userComments.txt create mode 100644 .besouro/20161005154353371/zorroEpisodes.txt diff --git a/.besouro/20161005154353371/actions.txt b/.besouro/20161005154353371/actions.txt new file mode 100644 index 0000000..c5412a2 --- /dev/null +++ b/.besouro/20161005154353371/actions.txt @@ -0,0 +1,2 @@ +FileOpenedAction 1475671433467 RomanNumerals.java 2790 6 15 0 +EditAction 1475671547447 RomanNumerals.java 2679 6 15 0 diff --git a/.besouro/20161005154353371/besouroEpisodes.txt b/.besouro/20161005154353371/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005154353371/disagreements.txt b/.besouro/20161005154353371/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005154353371/randomHeuristicEpisodes.txt b/.besouro/20161005154353371/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005154353371/userComments.txt b/.besouro/20161005154353371/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005154353371/zorroEpisodes.txt b/.besouro/20161005154353371/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index bdcc861..db01a08 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -40,8 +40,7 @@ public int convertToInteger(String romanNum) { subtrahend = getElementaryValue(c1); i--; } else if (!canBeSubtrahendElementaryValue(c1)) { - if (getElementaryValue(c1) < getElementaryValue(c0)) - throw new NumberFormatException("Illegal subtraction format."); + // V, L, D break; } From d76eaff4d78be4ba7b41befc5606f3bab7d0ebbf Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:47:31 +0300 Subject: [PATCH 146/147] besouro automatic message --- .besouro/20161005154353371/actions.txt | 3 +++ src/RomanNumerals.java | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.besouro/20161005154353371/actions.txt b/.besouro/20161005154353371/actions.txt index c5412a2..a7a8878 100644 --- a/.besouro/20161005154353371/actions.txt +++ b/.besouro/20161005154353371/actions.txt @@ -1,2 +1,5 @@ FileOpenedAction 1475671433467 RomanNumerals.java 2790 6 15 0 EditAction 1475671547447 RomanNumerals.java 2679 6 15 0 +UnitTestCaseAction 1475671550180 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475671550182 TestRomanNumerals.java FAIL +EditAction 1475671650813 RomanNumerals.java 2937 6 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index db01a08..7b0f31d 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -9,7 +9,8 @@ public int convertToInteger(String romanNum) { int retValue = 0; int duplicates = 0; - + + // Check illegal duplicate numerals for (int i = 01; i < romanNum.length(); i++) { if (i > 0) duplicates = (romanNum.charAt(i - 1) == romanNum.charAt(i)) ? duplicates + 1 : 0; @@ -21,6 +22,7 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Too many duplicate numeral characters."); } + // Process additions and subtractions for (int i = romanNum.length() - 1; i >= 0; i--) { char c0 = romanNum.charAt(i); @@ -38,9 +40,12 @@ public int convertToInteger(String romanNum) { throw new NumberFormatException("Illegal multiple subtractions."); subtrahend = getElementaryValue(c1); + // Consume subtrahend(s) i--; } else if (!canBeSubtrahendElementaryValue(c1)) { - // V, L, D + // V, L, D cannot be subtracted + if (getElementaryValue(c1) < getElementaryValue(c0)) + throw new NumberFormatException("Illegal subtraction format."); break; } From d13a39ffc52aaeab30b9fb442ca2fa1c66afeb8c Mon Sep 17 00:00:00 2001 From: somename Date: Wed, 5 Oct 2016 15:47:44 +0300 Subject: [PATCH 147/147] besouro automatic message --- .besouro/20161005154353371/actions.txt | 2 ++ .besouro/20161005154353371/besouroEpisodes.txt | 1 + .besouro/20161005154353371/randomHeuristicEpisodes.txt | 1 + .besouro/20161005154353371/zorroEpisodes.txt | 1 + 4 files changed, 5 insertions(+) diff --git a/.besouro/20161005154353371/actions.txt b/.besouro/20161005154353371/actions.txt index a7a8878..2490804 100644 --- a/.besouro/20161005154353371/actions.txt +++ b/.besouro/20161005154353371/actions.txt @@ -3,3 +3,5 @@ EditAction 1475671547447 RomanNumerals.java 2679 6 15 0 UnitTestCaseAction 1475671550180 TestRomanNumerals.java FAIL UnitTestSessionAction 1475671550182 TestRomanNumerals.java FAIL EditAction 1475671650813 RomanNumerals.java 2937 6 15 0 +UnitTestCaseAction 1475671659600 TestRomanNumerals.java OK +UnitTestSessionAction 1475671659601 TestRomanNumerals.java OK diff --git a/.besouro/20161005154353371/besouroEpisodes.txt b/.besouro/20161005154353371/besouroEpisodes.txt index e69de29..7580e4f 100644 --- a/.besouro/20161005154353371/besouroEpisodes.txt +++ b/.besouro/20161005154353371/besouroEpisodes.txt @@ -0,0 +1 @@ +1475671659601 refactoring 2A 226 true diff --git a/.besouro/20161005154353371/randomHeuristicEpisodes.txt b/.besouro/20161005154353371/randomHeuristicEpisodes.txt index e69de29..7580e4f 100644 --- a/.besouro/20161005154353371/randomHeuristicEpisodes.txt +++ b/.besouro/20161005154353371/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475671659601 refactoring 2A 226 true diff --git a/.besouro/20161005154353371/zorroEpisodes.txt b/.besouro/20161005154353371/zorroEpisodes.txt index e69de29..1720a71 100644 --- a/.besouro/20161005154353371/zorroEpisodes.txt +++ b/.besouro/20161005154353371/zorroEpisodes.txt @@ -0,0 +1 @@ +1475671659601 refactoring 2A 226 false