From 06adbe2241d755cd95ab7f7917bb96392101bc6e Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:36:05 +0300 Subject: [PATCH 01/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .besouro/20161007143530388/besouroEpisodes.txt | 0 .besouro/20161007143530388/disagreements.txt | 0 .../randomHeuristicEpisodes.txt | 0 .besouro/20161007143530388/userComments.txt | 0 .besouro/20161007143530388/zorroEpisodes.txt | 0 bin/.gitignore | 2 ++ bin/SpreadsheetTest.class | Bin 490 -> 821 bytes tests/SpreadsheetTest.java | 9 +++++---- 9 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .besouro/20161007143530388/actions.txt create mode 100644 .besouro/20161007143530388/besouroEpisodes.txt create mode 100644 .besouro/20161007143530388/disagreements.txt create mode 100644 .besouro/20161007143530388/randomHeuristicEpisodes.txt create mode 100644 .besouro/20161007143530388/userComments.txt create mode 100644 .besouro/20161007143530388/zorroEpisodes.txt create mode 100644 bin/.gitignore diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt new file mode 100644 index 0000000..50a601d --- /dev/null +++ b/.besouro/20161007143530388/actions.txt @@ -0,0 +1,3 @@ +FileOpenedAction 1475840130617 SpreadsheetTest.java 238 1 1 0 +RefactoringAction 1475840134467 SpreadsheetTest.java ADD Spreadsheet test FIELD +EditAction 1475840165755 SpreadsheetTest.java 237 1 2 1 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007143530388/disagreements.txt b/.besouro/20161007143530388/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007143530388/userComments.txt b/.besouro/20161007143530388/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..2079672 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +/Spreadsheet.class +/SpreadsheetTest.class diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index e7086bd9ef1b6a8b7afcfb717afbaddbf99a7876..75fbe4970bbd2b843536b2d02053ea9da2055957 100644 GIT binary patch literal 821 zcmZuvU2hUW6g@++OP8fkY^(L7_}Kz#5v}@wF+mfPCd5V|B=&8fBOO9_b$7P^%S36T zi9f&}Wjq5!R_nvg-aB*8J@?*ofByRR1HdkxIY=`!k7aHw1?AnU08=YZ{p*g3OlklQUb+R(3hjG47K%VmuYjPBY~A9yRDWLY`lwoqmNZrN1A}9 z?*~R29r%ndw1RL@8^$cLHVMz*vOua?&)|xHsM~U`dAN>EHV`THw_R?{dvBXi`-8^$ zn@ZOrZ+N(gTSN{la_c|H%6X`ZJJ@n?m(9$H_I#rTD)g|8vVe0UN3q)fAh2HEOQx8G zHC$A2-@(1VgqjxX;Q@9ii~1DH5ht*gtZJ%dqjKQlAs#uXGr@d7%_vf#@$eYC0GFXU*KG%J*jKN$m1#AhsvYf)?S}KEPqA*^CWVG=kf&4Eo6M2$Rh8&DFzp@N>4CzhI!X$FVb7*-{yWh%U!B|LB4pY mxG~1nsX0a|eTLg(RL)TQmx>FC95zWjrz-uSdcwphJpB#Dq_EQf delta 278 zcmdnW_KKP7)W2Q(7#J8#7^Ek1=}z>MVC0-IUw(-~Won5+ zW^O@FYHn&?Nooogg9w8dJA)`AgFt>!x_(w^US^5DV{vh6Q3(%&ID-Tu14~+BW)35R zsD@8gVp*boPGVlVesD=qW?s7WWHToHdIkn221W)}1~wqc4s?J%kY)tZtXkU{I5q+q zOblE=5+uz4RKN`+c_0daG%t|H$iN4bWn$omsuBRJ1Nj7E5Sx(T4hCU_NnAj+3_x>O Ufx5XFBw@y}!Hok70hLGr0F`Aad;kCd diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 9e0936a..8cc57d7 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -5,11 +5,12 @@ public class SpreadsheetTest { - + + Spreadsheet test = new Spreadsheet(); @Test public void test() { - fail("Not yet implemented"); - + test.set("A1", "1"); + assertTrue(test.get("A1").equals(1)); } -} +} \ No newline at end of file From 1888284369f7a304807752d8aa1749ad257ca484 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:43:43 +0300 Subject: [PATCH 02/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 9 +++++++++ src/Spreadsheet.java | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 50a601d..d94ac4c 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -1,3 +1,12 @@ FileOpenedAction 1475840130617 SpreadsheetTest.java 238 1 1 0 RefactoringAction 1475840134467 SpreadsheetTest.java ADD Spreadsheet test FIELD EditAction 1475840165755 SpreadsheetTest.java 237 1 2 1 +UnitTestCaseAction 1475840166304 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475840166305 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475840276083 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475840276084 SpreadsheetTest.java FAIL +RefactoringAction 1475840332575 Spreadsheet.java ADD String cell FIELD +RefactoringAction 1475840340105 Spreadsheet.java ADD String value FIELD +RefactoringAction 1475840455972 Spreadsheet.java REMOVE cell FIELD +RefactoringAction 1475840455973 Spreadsheet.java REMOVE value FIELD +EditAction 1475840623831 Spreadsheet.java 247 3 2 0 diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e4f120b..4786b79 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,13 +1,14 @@ public class Spreadsheet { + public String get(String cell) { // to be implemented return null; } public void set(String cell, String value) { - // to be implemented + } public String evaluate(String cell) { From 295b2d0ef1b23801e3dac505f3c18aa95629966f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:43:56 +0300 Subject: [PATCH 03/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 613 -> 613 bytes src/Spreadsheet.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index d94ac4c..1c1bf67 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -10,3 +10,6 @@ RefactoringAction 1475840340105 Spreadsheet.java ADD String value FIELD RefactoringAction 1475840455972 Spreadsheet.java REMOVE cell FIELD RefactoringAction 1475840455973 Spreadsheet.java REMOVE value FIELD EditAction 1475840623831 Spreadsheet.java 247 3 2 0 +UnitTestCaseAction 1475840624116 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475840624116 SpreadsheetTest.java FAIL +EditAction 1475840636637 Spreadsheet.java 254 3 2 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 92b411f05752a6cee6d06c9769e1b70d40aa0840..7964af8888d0f5668de889fa252dc1f0b7478846 100644 GIT binary patch delta 29 kcmaFL@|0!6T1H0p$@Wb0lg~0LGxALS$mq)`0OYFy0Fw*|ng9R* delta 29 kcmaFL@|0!6T1G~;$@Wb0lg~0LGjdP<$mq++59F%>0FvhjmjD0& diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 4786b79..b72b5fc 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -8,7 +8,7 @@ public String get(String cell) { } public void set(String cell, String value) { - + Cell A1 } public String evaluate(String cell) { From e80b536357fdae606fd1579bf7cfc35e088cbb43 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:44:19 +0300 Subject: [PATCH 04/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ bin/Spreadsheet.class | Bin 613 -> 613 bytes src/Spreadsheet.java | 3 +-- tests/SpreadsheetTest.java | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 1c1bf67..3a4667e 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -13,3 +13,8 @@ EditAction 1475840623831 Spreadsheet.java 247 3 2 0 UnitTestCaseAction 1475840624116 SpreadsheetTest.java FAIL UnitTestSessionAction 1475840624116 SpreadsheetTest.java FAIL EditAction 1475840636637 Spreadsheet.java 254 3 2 0 +CompilationAction 1475840636737 Spreadsheet.java +CompilationAction 1475840636737 Spreadsheet.java +CompilationAction 1475840646615 Spreadsheet.java +CompilationAction 1475840646616 Spreadsheet.java +EditAction 1475840659716 SpreadsheetTest.java 239 1 2 1 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 7964af8888d0f5668de889fa252dc1f0b7478846..92b411f05752a6cee6d06c9769e1b70d40aa0840 100644 GIT binary patch delta 29 kcmaFL@|0!6T1G~;$@Wb0lg~0LGjdP<$mq++59F%>0FvhjmjD0& delta 29 kcmaFL@|0!6T1H0p$@Wb0lg~0LGxALS$mq)`0OYFy0Fw*|ng9R* diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index b72b5fc..e4f120b 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,14 +1,13 @@ public class Spreadsheet { - public String get(String cell) { // to be implemented return null; } public void set(String cell, String value) { - Cell A1 + // to be implemented } public String evaluate(String cell) { diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 8cc57d7..0a9261f 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -10,7 +10,7 @@ public class SpreadsheetTest { @Test public void test() { test.set("A1", "1"); - assertTrue(test.get("A1").equals(1)); + assertTrue(test.get("A1").equals("1")); } } \ No newline at end of file From eef728a527c5c61630b8ba495cfc8f89b1a209e9 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:58:12 +0300 Subject: [PATCH 05/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 14 ++++++++++++++ bin/SpreadsheetTest.class | Bin 821 -> 751 bytes src/Spreadsheet.java | 14 +++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 3a4667e..d9b2259 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -18,3 +18,17 @@ CompilationAction 1475840636737 Spreadsheet.java CompilationAction 1475840646615 Spreadsheet.java CompilationAction 1475840646616 Spreadsheet.java EditAction 1475840659716 SpreadsheetTest.java 239 1 2 1 +RefactoringAction 1475840935848 Spreadsheet.java ADD String cells FIELD +RefactoringAction 1475841010430 Spreadsheet.java REMOVE cells FIELD +RefactoringAction 1475841032996 Spreadsheet.java ADD String vc FIELD +RefactoringAction 1475841035006 Spreadsheet.java RENAME vc=>String cells FIELD +RefactoringAction 1475841063069 Spreadsheet.java REMOVE cells FIELD +RefactoringAction 1475841065593 Spreadsheet.java ADD String cells FIELD +RefactoringAction 1475841088700 Spreadsheet.java REMOVE cells FIELD +RefactoringAction 1475841184234 Spreadsheet.java ADD Vector FIELD +RefactoringAction 1475841315787 Spreadsheet.java RENAME cells=>List al FIELD +RefactoringAction 1475841322179 Spreadsheet.java ADD import java.util.ArrayList IMPORT +RefactoringAction 1475841342859 Spreadsheet.java RENAME al=>ArrayList cells FIELD +RefactoringAction 1475841396573 Spreadsheet.java REMOVE cells FIELD +RefactoringAction 1475841404096 Spreadsheet.java ADD ArrayList cells FIELD +EditAction 1475841492045 Spreadsheet.java 392 3 4 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 75fbe4970bbd2b843536b2d02053ea9da2055957..f2536fc7c7de0e0a4bf12f0339f1e1eeb457bf2f 100644 GIT binary patch delta 154 zcmdnW_MVmN)W2Q(7#J8#7z{UZ)ia6-WF?j*>gOcprRxWm6lLb6^DwA0XiR?0s4S<& zpu^6f&B!2-UzDz&RhpMsqVHH-oLW@E!=THcH(7;gtExW(GXo>gG+C`J4E#dkLXz7U sq#?|04DukJ@(u>gNz7vMG7NkSLO_K)5akTQ3?e`tBZEGWWMVJ?05hr|%m4rY delta 242 zcmaFQx|NOV)W2Q(7#J8#7|b_v)iXv3W+j#->gOcprR#g cells=new ArrayList(); + + + public String get(String cell) { - // to be implemented - return null; + + return cells.get(cells.indexOf(cell)+1); + } public void set(String cell, String value) { - // to be implemented + cells.add(cell); + cells.add(value); + } public String evaluate(String cell) { From 236923e91c4d319e7b75e798c1ab15d0ba2e1a03 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 14:59:18 +0300 Subject: [PATCH 06/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 6 ++++++ .besouro/20161007143530388/besouroEpisodes.txt | 6 ++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/Spreadsheet.class | Bin 613 -> 961 bytes tests/SpreadsheetTest.java | 8 +++++++- 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index d9b2259..d220967 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -32,3 +32,9 @@ RefactoringAction 1475841342859 Spreadsheet.java RENAME al=>ArrayList ce RefactoringAction 1475841396573 Spreadsheet.java REMOVE cells FIELD RefactoringAction 1475841404096 Spreadsheet.java ADD ArrayList cells FIELD EditAction 1475841492045 Spreadsheet.java 392 3 4 0 +UnitTestCaseAction 1475841494069 SpreadsheetTest.java OK +UnitTestSessionAction 1475841494070 SpreadsheetTest.java OK +RefactoringAction 1475841517607 SpreadsheetTest.java RENAME test()=>void test1() METHOD +RefactoringAction 1475841525623 SpreadsheetTest.java ADD void test1()/2 METHOD +RefactoringAction 1475841557708 SpreadsheetTest.java RENAME test1()/2=>void test2() METHOD +EditAction 1475841558646 SpreadsheetTest.java 346 2 4 2 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index e69de29..9062a38 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -0,0 +1,6 @@ +1475841494070 test-first 3 1363 true +1475841494071 test-first 3 1363 true +1475841494072 test-first 3 1363 true +1475841494073 test-first 3 1363 true +1475841494074 test-first 3 1363 true +1475841494075 test-first 3 1363 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index e69de29..c6087df 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475841494070 test-first 3 1363 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index e69de29..c6087df 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -0,0 +1 @@ +1475841494070 test-first 3 1363 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 92b411f05752a6cee6d06c9769e1b70d40aa0840..10068e72fc8567f7bc3e59a0ce8988ab301fac32 100644 GIT binary patch literal 961 zcmZ`%U2hUW6g{&*x6tKVTEE+Br9f+WF}~0=Q4p-71&4$6wc(iY`W4L zH4pn|Y7hvd2Fi6O0+r7EZ5n8|`ONp_$Bv!^ErE1bk31PneI-!84znL7=cL`h*WRdg zz`CVju$|vqcyioBtRddP66S;bw}zyNGO~+=-F99q$;uT}9V>M#Hv) z8tSZ+!{L9lzTuM3r8}i{%gO{YV3_HSr~W{_)W*_6%(XqE3!7X)f`28!k9**+&B($s zl8m`Qo-52eC(2+7jSD!9@5mirpzsyN&vSH{XKv1uU|kA%#y6OA!WvYt%A25#HzU3_ z5f*cm#upULw==`7tu!ToFjm%?W%sAzU zvU+5K-5IJ!mz5ScT@fX=G2|Oz*@CRFOg~Ejm zZG5SaYqbXo?)7YB%E)1(iaZJmb8p! zWsjm`LyzN@_ifydBO8u;?e! Date: Fri, 7 Oct 2016 14:59:39 +0300 Subject: [PATCH 07/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ .besouro/20161007143530388/besouroEpisodes.txt | 3 +++ .../randomHeuristicEpisodes.txt | 2 ++ .besouro/20161007143530388/zorroEpisodes.txt | 2 ++ bin/SpreadsheetTest.class | Bin 751 -> 880 bytes tests/SpreadsheetTest.java | 4 +++- 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index d220967..50fa5eb 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -38,3 +38,8 @@ RefactoringAction 1475841517607 SpreadsheetTest.java RENAME test()=>void test1() RefactoringAction 1475841525623 SpreadsheetTest.java ADD void test1()/2 METHOD RefactoringAction 1475841557708 SpreadsheetTest.java RENAME test1()/2=>void test2() METHOD EditAction 1475841558646 SpreadsheetTest.java 346 2 4 2 +UnitTestCaseAction 1475841560449 SpreadsheetTest.java OK +UnitTestSessionAction 1475841560450 SpreadsheetTest.test2 OK +UnitTestCaseAction 1475841566486 SpreadsheetTest.java OK +UnitTestSessionAction 1475841566486 SpreadsheetTest.test2 OK +EditAction 1475841579097 SpreadsheetTest.java 350 2 4 2 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 9062a38..d13bc76 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -4,3 +4,6 @@ 1475841494073 test-first 3 1363 true 1475841494074 test-first 3 1363 true 1475841494075 test-first 3 1363 true +1475841560450 test-addition 1 42 true +1475841560451 test-addition 1 42 true +1475841566486 regression 1 0 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index c6087df..a25a682 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -1 +1,3 @@ 1475841494070 test-first 3 1363 true +1475841560450 test-addition 1 42 true +1475841566486 regression 1 0 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index c6087df..a149a69 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -1 +1,3 @@ 1475841494070 test-first 3 1363 true +1475841560450 test-addition 1 66 true +1475841566486 regression 1 6 true diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f2536fc7c7de0e0a4bf12f0339f1e1eeb457bf2f..627d5939a1ef2864f9e408c6705b02c4ad7981c8 100644 GIT binary patch delta 339 zcma)&%}&Bl5QWcNLaFrzwQBJP>JR>b!1ZE{3s*dWCOknGq=A@f+Uk3d`v5+Ji6Mps zOBXJD2H!vzu8jk(+_{)D^Cfd~Ci9X1w4B%P@dQACv!U~1<+EOz>EW9$trJ8?+t?(K zb|6ua@Udk)3alN8T~y5#X@4Jw1so6-2jP9FuERJ|-7M+Hk;D;d=7FmIF`5N5c;zOE z)Zi}eXR4E?y(E)pL78{*inG|ZjW&liwfUlR%9)1fUaZ1~fX4?~Ae6Yzaa|(E1XSuz zSa8?ejSSV9rWGc_ IDXT#61B%Z#BLDyZ delta 180 zcmWm7ISRs16h`6yzUYgDKtPDkG0vLAAqE20f;&(|>@3`X!#YInBHVz8SXf$EiIuz1 z6^L3M_~5+dD{kCA=L>)c;m)}3o`Fge#2`!{OQ6tziM)vd9Cj#@B@<;-cuJwHp`oMB zTe7t#T;5Yv`e^HD@tthdL6>06SF6QxJzj1WgqS Date: Fri, 7 Oct 2016 15:00:23 +0300 Subject: [PATCH 08/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ bin/SpreadsheetTest.class | Bin 880 -> 888 bytes src/Spreadsheet.java | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 50fa5eb..5417b07 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -43,3 +43,8 @@ UnitTestSessionAction 1475841560450 SpreadsheetTest.test2 OK UnitTestCaseAction 1475841566486 SpreadsheetTest.java OK UnitTestSessionAction 1475841566486 SpreadsheetTest.test2 OK EditAction 1475841579097 SpreadsheetTest.java 350 2 4 2 +UnitTestCaseAction 1475841581096 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841581096 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475841608270 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841608270 SpreadsheetTest.java FAIL +EditAction 1475841623813 Spreadsheet.java 391 3 4 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 627d5939a1ef2864f9e408c6705b02c4ad7981c8..8ffa6c73adb706c3608688b6fc57278bba5a871e 100644 GIT binary patch delta 119 zcmeys_JfV<)W2Q(7#J8#7|a)PF|j%taWI%nW@oz1$;-gaz{eoNz(4sllckTLknuJK z8Lcf0{6Z4j7!*J}l^qOP8-Y5R7zBYN9|JRx6b5P%0csLu5CZae7#M-1EKpPgNHa2+ J0!bzYGXUzd5+DEo delta 113 zcmeyt_JNJ-)W2Q(7#J8#7)%#(F-;a?y1~iAz|FwRAj7~n`7@KHkA#rnHU=53Ee!lZ z65ALQKs=Ql3|bq3dYBjlfg~RTGmsPnY7zo!5(bhC3_J{sKvEXS69LkU48}l`iNOQ_ DdDan7 diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 242c855..b297ae7 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -8,7 +8,7 @@ public class Spreadsheet { public String get(String cell) { - return cells.get(cells.indexOf(cell)+1); + return cells.get(cells.indexOf(cell)+1); } From 5d0bed0bf2a3c121e86dd0af01d3420d34018b5d Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 15:00:31 +0300 Subject: [PATCH 09/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + tests/SpreadsheetTest.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 5417b07..8063937 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -48,3 +48,4 @@ UnitTestSessionAction 1475841581096 SpreadsheetTest.java FAIL UnitTestCaseAction 1475841608270 SpreadsheetTest.java FAIL UnitTestSessionAction 1475841608270 SpreadsheetTest.java FAIL EditAction 1475841623813 Spreadsheet.java 391 3 4 0 +EditAction 1475841631711 SpreadsheetTest.java 350 2 4 2 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 273b47c..e379053 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -17,7 +17,7 @@ public void test1() { @Test public void test2() { test.set("A2", "-1"); - assertTrue(test.get("A1").equals("-1")); + assertTrue(test.get("A2").equals("-1")); } From f90f11b8de602304c5e02a4031d1d60b53ce0c53 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 15:28:47 +0300 Subject: [PATCH 10/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 888 -> 888 bytes src/Spreadsheet.java | 39 ++++++++++++++++++ 6 files changed, 47 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 8063937..7d6fc7b 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -49,3 +49,8 @@ UnitTestCaseAction 1475841608270 SpreadsheetTest.java FAIL UnitTestSessionAction 1475841608270 SpreadsheetTest.java FAIL EditAction 1475841623813 Spreadsheet.java 391 3 4 0 EditAction 1475841631711 SpreadsheetTest.java 350 2 4 2 +UnitTestCaseAction 1475841633409 SpreadsheetTest.java OK +UnitTestSessionAction 1475841633410 SpreadsheetTest.java OK +RefactoringAction 1475841656284 SpreadsheetTest.java ADD void test2()/2 METHOD +RefactoringAction 1475841661306 SpreadsheetTest.java RENAME test2()/2=>void test3() METHOD +EditAction 1475843327379 Spreadsheet.java 2181 3 3 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index d13bc76..6472ac0 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -7,3 +7,4 @@ 1475841560450 test-addition 1 42 true 1475841560451 test-addition 1 42 true 1475841566486 regression 1 0 true +1475841633410 refactoring 2A 54 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index a25a682..c10ff2e 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1475841494070 test-first 3 1363 true 1475841560450 test-addition 1 42 true 1475841566486 regression 1 0 false +1475841633410 refactoring 2A 54 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index a149a69..6a63ba7 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1475841494070 test-first 3 1363 true 1475841560450 test-addition 1 66 true 1475841566486 regression 1 6 true +1475841633410 refactoring 2A 66 true diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 8ffa6c73adb706c3608688b6fc57278bba5a871e..5b9dbb1ff3fe3f4bd0052a0d9948be908409f71f 100644 GIT binary patch delta 13 Ucmeyt_JeJMIWwc-WD8~o03-thCjbBd delta 13 Ucmeyt_JeJMIWwcgWD8~o03(J34gdfE diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index b297ae7..5f7fc10 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -8,6 +8,45 @@ public class Spreadsheet { public String get(String cell) { + + + if (cells.get(cells.indexOf(cell)+1).startsWith("0") || + cells.get(cells.indexOf(cell)+1).startsWith("1") || + cells.get(cells.indexOf(cell)+1).startsWith("2") || + cells.get(cells.indexOf(cell)+1).startsWith("3") || + cells.get(cells.indexOf(cell)+1).startsWith("4") || + cells.get(cells.indexOf(cell)+1).startsWith("5") || + cells.get(cells.indexOf(cell)+1).startsWith("6") || + cells.get(cells.indexOf(cell)+1).startsWith("7") || + cells.get(cells.indexOf(cell)+1).startsWith("8") || + cells.get(cells.indexOf(cell)+1).startsWith("9") || + cells.get(cells.indexOf(cell)+1).startsWith("-") || + cells.get(cells.indexOf(cell)+1).startsWith("+")){ + for(int i=0; i Date: Fri, 7 Oct 2016 15:32:35 +0300 Subject: [PATCH 11/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 4 ++++ bin/Spreadsheet.class | Bin 961 -> 983 bytes src/Spreadsheet.java | 19 +++++++------------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 7d6fc7b..5d44ef5 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -54,3 +54,7 @@ UnitTestSessionAction 1475841633410 SpreadsheetTest.java OK RefactoringAction 1475841656284 SpreadsheetTest.java ADD void test2()/2 METHOD RefactoringAction 1475841661306 SpreadsheetTest.java RENAME test2()/2=>void test3() METHOD EditAction 1475843327379 Spreadsheet.java 2181 3 3 0 +CompilationAction 1475843327862 Spreadsheet.java +CompilationAction 1475843515796 Spreadsheet.java +CompilationAction 1475843515905 Spreadsheet.java +EditAction 1475843555576 Spreadsheet.java 1971 3 4 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 10068e72fc8567f7bc3e59a0ce8988ab301fac32..c9419273ebc1ba2a8c6a550b895b70fd209029e5 100644 GIT binary patch delta 406 zcmY+9%TB^T7=_QY2BZ>HDkR`-6qRej!o~%z-MR9DVOe36nqJ7XU|jJKeGNAxMiWgi zZhZk?#g*}I>&DHQ?>{*?C-ag1N^74#uX6wfS~JaH(=^Hq%Xj9)Y}=-L+dh%flZ)73 zIJ5tBqwxQ1 zSX3UT22?2Y9qkRJUVi-ro9}cf&`DEZq#3M{W@FY+K#?v6jvdk^;vS_{diBN=R-4b* zy^5d}!Hn#rDi=o%smwqgM{y-5FYKy0{Q%XtT}O>bA+Cq_YNgtVV?}bJnq)bmB+t-@ G{pK$p%TOr* delta 358 zcmcc4evqB()W2Q(7#J8#81y!BnJ|iQG4L@+@i0g;$S^XnXXd4(R`{n)=4BEO^#sYt z@i2%p$TKpCYIth;WF?j*>gOcprR)1AWu+#UShF)IGBOAtgo8_pGV{_I8Ca52b8;9N zgphPVq^u{OWi(+^=V8!b(45T9q%hf;X;r-^12Y2?&_$wJTNngESbH0TBum0J2H67) z3LAhDObo(6l8u28NOCiX07)^31_n_e3j{eDRKpCUg`q~O zg@YJ6+ZfcsHv)wrhVn5mn*lij44e#t3_?JAK&C4|^ubLRhMEpEi$M!$4-?P^?a95& T%8cTZH!_R!!|c`p8> Date: Fri, 7 Oct 2016 15:32:46 +0300 Subject: [PATCH 12/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 2 ++ bin/Spreadsheet.class | Bin 983 -> 983 bytes src/Spreadsheet.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 5d44ef5..e189c70 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -58,3 +58,5 @@ CompilationAction 1475843327862 Spreadsheet.java CompilationAction 1475843515796 Spreadsheet.java CompilationAction 1475843515905 Spreadsheet.java EditAction 1475843555576 Spreadsheet.java 1971 3 4 0 +CompilationAction 1475843555669 Spreadsheet.java +EditAction 1475843566745 Spreadsheet.java 1978 3 4 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index c9419273ebc1ba2a8c6a550b895b70fd209029e5..ba61d573c57a87fb32c797522020eb2df14605b6 100644 GIT binary patch delta 27 icmcc4ew}?o6f>t011EzqgAjx1tW11EzCgAjw+ Date: Fri, 7 Oct 2016 15:40:34 +0300 Subject: [PATCH 13/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 983 -> 983 bytes src/Spreadsheet.java | 11 +++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index e189c70..5ca239f 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -60,3 +60,6 @@ CompilationAction 1475843515905 Spreadsheet.java EditAction 1475843555576 Spreadsheet.java 1971 3 4 0 CompilationAction 1475843555669 Spreadsheet.java EditAction 1475843566745 Spreadsheet.java 1978 3 4 0 +CompilationAction 1475843566839 Spreadsheet.java +CompilationAction 1475843738517 Spreadsheet.java +EditAction 1475844034841 Spreadsheet.java 1970 3 5 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index ba61d573c57a87fb32c797522020eb2df14605b6..df8d98075648f36a486cf875174825c24846b535 100644 GIT binary patch delta 27 icmcc4ew}?o6f>s*11EzagAjx9 delta 27 icmcc4ew}?o6f>t011EzqgAjx1 Date: Fri, 7 Oct 2016 15:43:02 +0300 Subject: [PATCH 14/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/Spreadsheet.class | Bin 983 -> 2094 bytes tests/SpreadsheetTest.java | 6 ++++++ 3 files changed, 7 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 5ca239f..0613006 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -63,3 +63,4 @@ EditAction 1475843566745 Spreadsheet.java 1978 3 4 0 CompilationAction 1475843566839 Spreadsheet.java CompilationAction 1475843738517 Spreadsheet.java EditAction 1475844034841 Spreadsheet.java 1970 3 5 0 +EditAction 1475844182542 SpreadsheetTest.java 460 3 6 3 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index df8d98075648f36a486cf875174825c24846b535..497317c92b44232909887825c1f0c392ed64355b 100644 GIT binary patch literal 2094 zcmZ{lO>7%g5Xb+s>)0E2oj6XDCQZ^LO`FC}+cc^3QIZDwl@f59Q0GJKiM73TwiqYc zT}N<56{kv^dVm`jio_*I#6?u9IG}>KQ;8cA5=U-aXjPc^c1umNd+^Tg`^}qq@Be0= ze}3`ZV*pvK$Dj}nBbNtB<~p8##qIumdBO~cg&(oXeyeOibLqgNmg^M z%Gd?lHa^T*jyp?e&RgZG;nr-EkPh;h^9E(mylY$4^6Wg%i_Te9%bh2vBk46lFCvv=Z6_GRDz@L^B8}9ZiT5T60#_yk2|1VA?B2p~9<3 zpfjsYCkF^m(0xZ@hO>#SSu#-41xoatK{(mZQi!zh~x z4X4rZh~lnbt7PW=6v~Hs>_36m&|%c{ZaW_v<>|zy&^Cr&e&} zq3zp-pIpNwKFpyjw!LYKnOAfy;3^MQ%xYPzn9p~S&sUU@IGa}$<_F-E7XR2Mk#~*a zd)JID|IAcJ9L|YGef>H6qomh_;>$YT!41x7luCQFdU-OpxTLp@N{tIeGsTPH@@qW5 zS+k4gf+Y$l*-#^=#d@ zzQ;i7XdTBsqv=34B3Vx$%Ls;l0@+E)eh*})CHpauossOTKsF)SCxI+0nG?vSBwG(; zGm^~)vezW*4`g%9KBar=`3GbLIrP>s?+d#S$~|$1L%9@~qM_Uq`HxWU3H>CLdt!eP z%00n94&|Qcw?nxn{6Z-A#2*gjvM>=%UEH~=P;Zc19hX0U@zDcx1;L%bL2eBdqJ_56 zC!3}h3CwUqt#Bi4A&Glv!lppDgIKJDYPS=>;rjqfmIXNPNzrzi>CO| J2&>Y6?Oz=|!P)=- delta 364 zcmX|5+e!ja6kX>CP97vn)3B^gT4^R&Bm~iGZ_z_H>2beCP(KhLiK8mNs#gAEPLF{G}{fmwG@AhoR)VA-*p7Jjo%iWbCaniK|=~}w$x1`$-v{aVvD^Hq4g1)1r z-onFfhC4)<$zMdca~yj;T>o>yy1l~9=qM6mN9T@ zD_)R4PtQML;f*Ga3}GCMFo7AuWW)us$kD_gu^bMK*~4P9`he-$BZ|!t9sV9C$rRY6 v*Da*69T~`Iml+#?0@hHDOf#qu Date: Fri, 7 Oct 2016 15:45:49 +0300 Subject: [PATCH 15/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 888 -> 1029 bytes src/Spreadsheet.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 0613006..1ca2bbd 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -64,3 +64,6 @@ CompilationAction 1475843566839 Spreadsheet.java CompilationAction 1475843738517 Spreadsheet.java EditAction 1475844034841 Spreadsheet.java 1970 3 5 0 EditAction 1475844182542 SpreadsheetTest.java 460 3 6 3 +UnitTestCaseAction 1475844183793 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844183793 SpreadsheetTest.java FAIL +EditAction 1475844349699 Spreadsheet.java 1970 3 5 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 5b9dbb1ff3fe3f4bd0052a0d9948be908409f71f..dc1846a33fcd279a5322ad238f694aec0c8de433 100644 GIT binary patch delta 146 zcmeyt*2=+k>ff$?3=9k=40ap2c$kz}OHzwVj5!$085x)yfwU!%Hg)7+ux4anQ+6#X z$}gHM!eq|Kve}18opJI)CM6#;A&YGcGFn?0_=U{2F(?RGZDUZ`!JxGfXebkdAduu^ nUff$?3=9k=4CWiTc$g+zF_|(lZ!Ta`XJlnyU}7)>0M9)LoB#j- diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index c28b6ed..41cf004 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -22,7 +22,7 @@ public String get(String cell) { cells.get(cells.indexOf(cell)+1).startsWith("-") || cells.get(cells.indexOf(cell)+1).startsWith("+")){ - for(int i=0; i Date: Fri, 7 Oct 2016 15:49:04 +0300 Subject: [PATCH 16/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 8 ++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/Spreadsheet.class | Bin 2094 -> 2094 bytes src/Spreadsheet.java | 2 ++ 6 files changed, 15 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 1ca2bbd..aaf5bb3 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -67,3 +67,6 @@ EditAction 1475844182542 SpreadsheetTest.java 460 3 6 3 UnitTestCaseAction 1475844183793 SpreadsheetTest.java FAIL UnitTestSessionAction 1475844183793 SpreadsheetTest.java FAIL EditAction 1475844349699 Spreadsheet.java 1970 3 5 0 +UnitTestCaseAction 1475844350014 SpreadsheetTest.java OK +UnitTestSessionAction 1475844350014 SpreadsheetTest.java OK +EditAction 1475844544516 Spreadsheet.java 2020 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 6472ac0..ddc36b4 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -8,3 +8,11 @@ 1475841560451 test-addition 1 42 true 1475841566486 regression 1 0 true 1475841633410 refactoring 2A 54 true +1475844350014 test-first 4 2693 true +1475844350015 test-first 4 2693 true +1475844350016 test-first 4 2693 true +1475844350017 test-first 4 2693 true +1475844350018 test-last 1 2693 false +1475844350019 test-last 1 2693 false +1475844350020 test-last 1 2693 false +1475844350021 test-last 1 2693 false diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index c10ff2e..69fccee 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -2,3 +2,4 @@ 1475841560450 test-addition 1 42 true 1475841566486 regression 1 0 false 1475841633410 refactoring 2A 54 false +1475844350014 test-first 4 2693 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 6a63ba7..3d22098 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -2,3 +2,4 @@ 1475841560450 test-addition 1 66 true 1475841566486 regression 1 6 true 1475841633410 refactoring 2A 66 true +1475844350014 test-first 4 2716 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 497317c92b44232909887825c1f0c392ed64355b..11ff71ca7dde08d65f199e990f183f4e8d23d88f 100644 GIT binary patch delta 22 ecmZ1{uufnDCo3z9?Q+J<$sd_THY>66FarQhaRwFu delta 22 ecmZ1{uufnDCo3zn?Q+J<$sd_THY>66FarQhV+Iuf diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 41cf004..33ed0c6 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -35,6 +35,8 @@ public String get(String cell) { cells.get(cells.indexOf(cell)+1).substring(i).startsWith("9")|| cells.get(cells.indexOf(cell)+1).substring(i).startsWith("0"))){ return "#Error"; + }else{ + cells.get(cells.indexOf(cell)+1); } } From f71f561c2089e71ef2983760a5807a90d0952835 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:02:01 +0300 Subject: [PATCH 17/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 4 ++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/Spreadsheet.class | Bin 2094 -> 2116 bytes src/Spreadsheet.java | 54 +++++++++--------- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index aaf5bb3..94da00a 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -70,3 +70,7 @@ EditAction 1475844349699 Spreadsheet.java 1970 3 5 0 UnitTestCaseAction 1475844350014 SpreadsheetTest.java OK UnitTestSessionAction 1475844350014 SpreadsheetTest.java OK EditAction 1475844544516 Spreadsheet.java 2020 3 5 0 +UnitTestCaseAction 1475844546828 SpreadsheetTest.java OK +UnitTestSessionAction 1475844546828 SpreadsheetTest.java OK +RefactoringAction 1475845266739 SpreadsheetTest.java ADD void test3()/2 METHOD +EditAction 1475845321654 Spreadsheet.java 2128 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index ddc36b4..fc61dda 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -16,3 +16,4 @@ 1475844350019 test-last 1 2693 false 1475844350020 test-last 1 2693 false 1475844350021 test-last 1 2693 false +1475844546828 refactoring 2A 2 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 69fccee..92db1c0 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -3,3 +3,4 @@ 1475841566486 regression 1 0 false 1475841633410 refactoring 2A 54 false 1475844350014 test-first 4 2693 true +1475844546828 refactoring 2A 2 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 3d22098..15a4431 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -3,3 +3,4 @@ 1475841566486 regression 1 6 true 1475841633410 refactoring 2A 66 true 1475844350014 test-first 4 2716 true +1475844546828 refactoring 2A 196 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 11ff71ca7dde08d65f199e990f183f4e8d23d88f..2b0b826fe54e54f130db0a2c33da9a056bb12cb0 100644 GIT binary patch delta 159 zcmZ1{a719k24>EC3@i-H3=GVolRq+xZa&9s#mF{~#dbMkHIOf|S&7x3QAleGgCGcN zZ)1>TN!Z398$P*^O_s4>azC3Ha}|T!iuufpZ24>C^3@i-H3=GW7lRq+xZa&9s#mLsfV!NC%6UZ0Yti Date: Fri, 7 Oct 2016 16:02:03 +0300 Subject: [PATCH 18/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/Spreadsheet.class | Bin 2116 -> 2120 bytes tests/SpreadsheetTest.java | 5 +++++ 3 files changed, 6 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 94da00a..6da4fbb 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -74,3 +74,4 @@ UnitTestCaseAction 1475844546828 SpreadsheetTest.java OK UnitTestSessionAction 1475844546828 SpreadsheetTest.java OK RefactoringAction 1475845266739 SpreadsheetTest.java ADD void test3()/2 METHOD EditAction 1475845321654 Spreadsheet.java 2128 3 5 0 +EditAction 1475845323853 SpreadsheetTest.java 568 4 8 4 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 2b0b826fe54e54f130db0a2c33da9a056bb12cb0..b32cd6ae12b2342a8ccc912182dd25259964710d 100644 GIT binary patch delta 19 acmX>ia6({%7b6>YPGWJ1=Vl+qA8Y_a^aiv5 delta 15 WcmX>ha718(7b6pU=H>v#A8Y_CM+F=J diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 3765b67..74d6d91 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -24,6 +24,11 @@ public void test3() { test.set("A3", "5A"); assertTrue(test.get("A3").equals("#Error")); } + @Test + public void test3() { + test.set("A3", "5A"); + assertTrue(test.get("A3").equals("#Error")); + } From b26601ccc14ed736fbc8499fd0bd480b9efac712 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:02:31 +0300 Subject: [PATCH 19/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ tests/SpreadsheetTest.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 6da4fbb..36ad433 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -75,3 +75,6 @@ UnitTestSessionAction 1475844546828 SpreadsheetTest.java OK RefactoringAction 1475845266739 SpreadsheetTest.java ADD void test3()/2 METHOD EditAction 1475845321654 Spreadsheet.java 2128 3 5 0 EditAction 1475845323853 SpreadsheetTest.java 568 4 8 4 +CompilationAction 1475845323947 SpreadsheetTest.java +RefactoringAction 1475845350217 SpreadsheetTest.java RENAME test3()/2=>void test4() METHOD +EditAction 1475845350966 SpreadsheetTest.java 568 4 8 4 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 74d6d91..07e0838 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -25,9 +25,9 @@ public void test3() { assertTrue(test.get("A3").equals("#Error")); } @Test - public void test3() { - test.set("A3", "5A"); - assertTrue(test.get("A3").equals("#Error")); + public void test4() { + test.set("A1", "5A"); + assertTrue(test.get("A1").equals("#Error")); } From ab3bf2526a6db5a84f65c9517cb80b121cca6e47 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:09:16 +0300 Subject: [PATCH 20/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 2 ++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1029 -> 1142 bytes src/Spreadsheet.java | 10 +++++++++- 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 36ad433..c779e45 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -78,3 +78,6 @@ EditAction 1475845323853 SpreadsheetTest.java 568 4 8 4 CompilationAction 1475845323947 SpreadsheetTest.java RefactoringAction 1475845350217 SpreadsheetTest.java RENAME test3()/2=>void test4() METHOD EditAction 1475845350966 SpreadsheetTest.java 568 4 8 4 +UnitTestCaseAction 1475845352545 SpreadsheetTest.java OK +UnitTestSessionAction 1475845352545 SpreadsheetTest.java OK +EditAction 1475845756212 Spreadsheet.java 2404 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index fc61dda..5aec91c 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -17,3 +17,5 @@ 1475844350020 test-last 1 2693 false 1475844350021 test-last 1 2693 false 1475844546828 refactoring 2A 2 true +1475845352545 test-first 4 85 true +1475845352546 test-last 1 85 false diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 92db1c0..fafdfd3 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -4,3 +4,4 @@ 1475841633410 refactoring 2A 54 false 1475844350014 test-first 4 2693 true 1475844546828 refactoring 2A 2 true +1475845352545 test-first 4 85 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 15a4431..c0b1309 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -4,3 +4,4 @@ 1475841633410 refactoring 2A 66 true 1475844350014 test-first 4 2716 true 1475844546828 refactoring 2A 196 true +1475845352545 test-first 4 805 true diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index dc1846a33fcd279a5322ad238f694aec0c8de433..f6ef7f009ee218fbfe1a6ab74a6dc161144caf91 100644 GIT binary patch delta 85 zcmZqW_{PC?>ff$?3=9k=4E7tj44BwhOHzwVOeR|}nKQC(E?}C#I9ZQbNl-$_VjF{u p))oeSA&G4a3PM(s6Pd+0Wf`~`>Ui?Z7SO<`iN0|3vW5}yD7 delta 36 scmeyy(aOPf>ff$?3=9k=40ap2445W6F_|*5Y_4FMz{twLz{Fq+0N0KQNB{r; diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 366931a..2afa2d2 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -38,7 +38,15 @@ public String get(String cell) { }else{ cells.get(cells.lastIndexOf(cell)+1); } - } + } + }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("'")){ + + if(cells.get(cells.lastIndexOf(cell)+1).endsWith("'")){ + return cells.get(cells.lastIndexOf(cell)+1).substring(1,cells.get(cells.lastIndexOf(cell)+1).length()); + }else{ + return "#Error"; + } + }else{ return cells.get(cells.lastIndexOf(cell)+1); From 2a3610ff1d3d034e784bd2c385b49913c088a247 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:11:59 +0300 Subject: [PATCH 21/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/Spreadsheet.class | Bin 2120 -> 2306 bytes src/Spreadsheet.java | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index c779e45..0c26e12 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -81,3 +81,4 @@ EditAction 1475845350966 SpreadsheetTest.java 568 4 8 4 UnitTestCaseAction 1475845352545 SpreadsheetTest.java OK UnitTestSessionAction 1475845352545 SpreadsheetTest.java OK EditAction 1475845756212 Spreadsheet.java 2404 3 5 0 +EditAction 1475845919232 Spreadsheet.java 2404 3 5 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index b32cd6ae12b2342a8ccc912182dd25259964710d..ccf41369cd5b09fa3dcecffe727f8423ff2fb193 100644 GIT binary patch delta 420 zcmYL^PfG$(6vfYbZ&I6vNFCiphJj^TFAuY13OiR=LVH9eGfk~^NDCi3e1bz#p zm_F2qS+-m&NpVHP999{;qw)Ay;;3+52%i)x#c;Y-Emw+Bqe_NFyvVh=^lML8m|X{*vHA#qN+o8XW5+d*EoXff$?3=9k=4B;EOikK$vX3Ag-;9&@42%4&lGXn#&=;T0F zk<9`u*O(Y3K+MT$?DEW2404k@*z@bPnO-yK09ENRhyaaJfM{S4We@}MfLa+m7(5vm z8G{(7F?ca}GcYmu0EGn^*nTqx{9#~W{LPpo@{2)Mgn^O4m%$H6as#C!fy#g;G6-vJ zVGz{b#^4_gV(5Sv8-c=148lN?53IzPgMkz1ejx_4$$cE+!eGllIvIk2)-nOj3z@uw bLs{Jl>^L!?2uM5BaX=PCJtIRXSUd~>R0}Gd diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 2afa2d2..4016471 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -39,9 +39,9 @@ public String get(String cell) { cells.get(cells.lastIndexOf(cell)+1); } } - }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("'")){ + }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("’")){ - if(cells.get(cells.lastIndexOf(cell)+1).endsWith("'")){ + if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ return cells.get(cells.lastIndexOf(cell)+1).substring(1,cells.get(cells.lastIndexOf(cell)+1).length()); }else{ return "#Error"; From 9da5e4274c90f698135488e3c684887bff8a0711 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:12:15 +0300 Subject: [PATCH 22/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/Spreadsheet.class | Bin 2306 -> 2308 bytes tests/SpreadsheetTest.java | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 0c26e12..55e75b4 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -82,3 +82,4 @@ UnitTestCaseAction 1475845352545 SpreadsheetTest.java OK UnitTestSessionAction 1475845352545 SpreadsheetTest.java OK EditAction 1475845756212 Spreadsheet.java 2404 3 5 0 EditAction 1475845919232 Spreadsheet.java 2404 3 5 0 +EditAction 1475845935222 SpreadsheetTest.java 578 4 8 4 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index ccf41369cd5b09fa3dcecffe727f8423ff2fb193..a962dc824f92a6b902f97a4a21e303bae7509044 100644 GIT binary patch delta 17 YcmZn?Y7yGd$i%|@sA1;jW~O>J05+Qj9RL6T delta 15 WcmZn>Y7*Me$i&2`zPXjDo(%vbg9Jwa diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 07e0838..6bd4ffd 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -26,8 +26,8 @@ public void test3() { } @Test public void test4() { - test.set("A1", "5A"); - assertTrue(test.get("A1").equals("#Error")); + test.set("A1", "’a string’"); + assertTrue(test.get("A1").equals("a string")); } From 01ca4b5cf15e7bd33ded4b6fddf2eefb914868fc Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:13:11 +0300 Subject: [PATCH 23/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 1142 -> 1176 bytes src/Spreadsheet.java | 1 + 3 files changed, 4 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 55e75b4..a28734d 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -83,3 +83,6 @@ UnitTestSessionAction 1475845352545 SpreadsheetTest.java OK EditAction 1475845756212 Spreadsheet.java 2404 3 5 0 EditAction 1475845919232 Spreadsheet.java 2404 3 5 0 EditAction 1475845935222 SpreadsheetTest.java 578 4 8 4 +UnitTestCaseAction 1475845937737 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475845937737 SpreadsheetTest.java FAIL +EditAction 1475845991869 Spreadsheet.java 2435 3 5 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f6ef7f009ee218fbfe1a6ab74a6dc161144caf91..0220ead063f11ecc5b1c3564eee7a6e730954268 100644 GIT binary patch delta 90 zcmeyyF@uxq)W2Q(7#J8#7@Rk9nK3DGFxW9N@I7jnnW#`)Qk0pO4rFpLI50ABzyvls mFuh^qx824dqqT*BUr1sbgMyI#BxbS6fh= Date: Fri, 7 Oct 2016 16:13:36 +0300 Subject: [PATCH 24/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ bin/Spreadsheet.class | Bin 2308 -> 2460 bytes src/Spreadsheet.java | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index a28734d..401063e 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -86,3 +86,8 @@ EditAction 1475845935222 SpreadsheetTest.java 578 4 8 4 UnitTestCaseAction 1475845937737 SpreadsheetTest.java FAIL UnitTestSessionAction 1475845937737 SpreadsheetTest.java FAIL EditAction 1475845991869 Spreadsheet.java 2435 3 5 0 +CompilationAction 1475845992088 Spreadsheet.java +CompilationAction 1475846006705 Spreadsheet.java +UnitTestCaseAction 1475846008471 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846008471 SpreadsheetTest.java FAIL +EditAction 1475846016583 Spreadsheet.java 2414 3 5 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index a962dc824f92a6b902f97a4a21e303bae7509044..907103b9730f9c1e5ddeb012a5229359cef9be9b 100644 GIT binary patch delta 453 zcmZvYPfHt76vcmc#yXQ2TAfMEN{Dr18!-sd7D9`QE~MBRP1TzCZ`2rL^QV|;!IcOu zif)7l1))p7Kvc4D(GTDU=&~QAsp6Z-wwrg)J@?#mF7Md+=|*qwZ+-!j)LPLq<1oSp zau%~f|DN~F%T&F3Ig>wV`lVWoIpzhk@zoa+GvT<>$mI4bbwBU#m%Lim=A#yP&Fv_Q ze6m;)-2doeEK?AyFTrZHuH8nvcGYAU=WD*4eYO}S#Y&7RR@H@Z)VmX-%&tnCw~-Q$ zFv0w;hOPLO)AQSq(*UZwUP}rA>UXBwygMg*$$KZ?WW`g#(wz#QLzC(Q@&;l3 delta 304 zcmYL?Pb)-W6vlt=`_8z3nv{F*T%s6JN{X7vhNRgW++nWqcWL1h%#O&K-cm~W3NsO9 zVQ&_8K89}~IdhF{o}TBN=lsrHcoF#B@0VAg!coV+(!NiLT7gy8?SeTQ*eTFt*FKxB z*CdYtb84@h;=_IJL#uPKBf05Y5;0?{EE?H2XEeXo4yx@eeK`~6l1V%6w#s$pO@oR# zVUb9FmVS8@i6se{4K`6KQ8y&i(QMgwH};Nogkqb9{d9+GX*&DJ(A*Pg+L0?wC_30f tv4qDm0W1G_+4k|`GQ9Lc_T-Tk=)O(7shMilk7d&1{q=RfuQ Date: Fri, 7 Oct 2016 16:14:02 +0300 Subject: [PATCH 25/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 2460 -> 2308 bytes src/Spreadsheet.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 401063e..959aa33 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -91,3 +91,6 @@ CompilationAction 1475846006705 Spreadsheet.java UnitTestCaseAction 1475846008471 SpreadsheetTest.java FAIL UnitTestSessionAction 1475846008471 SpreadsheetTest.java FAIL EditAction 1475846016583 Spreadsheet.java 2414 3 5 0 +UnitTestCaseAction 1475846017163 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846017163 SpreadsheetTest.java FAIL +EditAction 1475846042873 Spreadsheet.java 2416 3 5 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 907103b9730f9c1e5ddeb012a5229359cef9be9b..61acd664c445be7b229935fa47fa01833899437f 100644 GIT binary patch delta 238 zcmbOu+#ff$?3=9k=4DlPeCNObvF(@$j@h~_r_)j)qZe)w#VTfdin!KI)6lWv@ zD+4nF19QXViR_}A=d)a8Vr&L7C0JBuG6Vq`(u~GHQe^T;b}3fh4MI*Ez`Q@~^2}`v zij(Cy%1!l{gBc8&!x+q%vl%QHM1Zy`Kuly1We@}MfMzoUFa$C%G6peDV+djhW?*6n znS72zj5D1{gn^MElp$>LTMluq@Nlgy41zk_7{Vv>aT*GPwE%SsGeiS5GXWLGOb+6- P=7)$gGQA*!`G_#e delta 428 zcmZvY&q@MO7{$+>YtA?gWHV!}0&7)SN)Q#yre#EbCM``ZYs|^CQA4L92qb6`wh0D; zpk*&$g$oxwfDh2aWJPy$+valaxxeq6k9#XWD`Mxj{Q+PerKb46)qU82&SR6nUoe$A zqzL#kchoAgw8?&)HQKAQnV;9D;v$0Bldz0^=Y_lR9!tpM#0k-k&%^*IK<}J!UVW22 zpB%Y&rSs$ENy=4zd8LKbCupx&mt!sLFf&Zjj?ORA1}2;ae_5ZUA%tlfb2NhmTEh}l z_7%Z?G6EQ3H`aj+4nRnhJmL@rIAoa}fY2rSH$0?Evg#Mcx~Om}2#%0r=O9Cp3}s6~ rnSRG`s0B0OiWyflnaw%ZLP+UlyATSjg=3>dr!8nheV^deC1L#m#Ry+w diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 50095fc..f8f08a8 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -43,7 +43,7 @@ public String get(String cell) { if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ - return cells.get(cells.lastIndexOf(cell)+1).substring(1,cells.get(cells.lastIndexOf(cell)+1).length()); + return cells.get(cells.lastIndexOf(cell)+1).substring(1,cells.get(cells.lastIndexOf(cell)+1).length()-1); }else{ return "#Error"; From ba2b991c15a3c4a3b2164f593719fdde23d5e3cf Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:14:56 +0300 Subject: [PATCH 26/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 4 ++++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/Spreadsheet.class | Bin 2308 -> 2310 bytes tests/SpreadsheetTest.java | 5 +++++ 6 files changed, 12 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 959aa33..818357d 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -94,3 +94,7 @@ EditAction 1475846016583 Spreadsheet.java 2414 3 5 0 UnitTestCaseAction 1475846017163 SpreadsheetTest.java FAIL UnitTestSessionAction 1475846017163 SpreadsheetTest.java FAIL EditAction 1475846042873 Spreadsheet.java 2416 3 5 0 +UnitTestCaseAction 1475846044935 SpreadsheetTest.java OK +UnitTestSessionAction 1475846044935 SpreadsheetTest.java OK +RefactoringAction 1475846080128 SpreadsheetTest.java ADD void test4()/2 METHOD +EditAction 1475846096883 SpreadsheetTest.java 693 5 10 5 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 5aec91c..ed43912 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -19,3 +19,4 @@ 1475844546828 refactoring 2A 2 true 1475845352545 test-first 4 85 true 1475845352546 test-last 1 85 false +1475846044935 refactoring 2A 288 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index fafdfd3..dd7fb85 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -5,3 +5,4 @@ 1475844350014 test-first 4 2693 true 1475844546828 refactoring 2A 2 true 1475845352545 test-first 4 85 true +1475846044935 refactoring 2A 288 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index c0b1309..d306460 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -5,3 +5,4 @@ 1475844350014 test-first 4 2716 true 1475844546828 refactoring 2A 196 true 1475845352545 test-first 4 805 true +1475846044935 refactoring 2A 692 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 61acd664c445be7b229935fa47fa01833899437f..4b3a09cfa7278a8532094d070a184d2c6396c439 100644 GIT binary patch delta 106 zcmZn>Y7^SHU_Vm45mPi y4iihtWMB4eilGdK%n=M`%()B}3?d8+3HU_Vm48}l? v&SZb~ZHmDRhRk6MX3W_P77QW`3=9eo6BtAp#DF}IS!x^_jOmm8Ikp1;x Date: Fri, 7 Oct 2016 16:15:00 +0300 Subject: [PATCH 27/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 2 ++ tests/SpreadsheetTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 818357d..27c064b 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -98,3 +98,5 @@ UnitTestCaseAction 1475846044935 SpreadsheetTest.java OK UnitTestSessionAction 1475846044935 SpreadsheetTest.java OK RefactoringAction 1475846080128 SpreadsheetTest.java ADD void test4()/2 METHOD EditAction 1475846096883 SpreadsheetTest.java 693 5 10 5 +CompilationAction 1475846097101 SpreadsheetTest.java +EditAction 1475846100097 SpreadsheetTest.java 693 5 10 5 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index e5b6878..1880f34 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -30,7 +30,7 @@ public void test4() { assertTrue(test.get("A1").equals("a string")); } @Test - public void test4() { + public void test5() { test.set("A1", "’a string"); assertTrue(test.get("A1").equals("#Error")); } From c763a896b4e5fc332776604b5d4cbcaa0df4df9f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:17:30 +0300 Subject: [PATCH 28/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 + .../20161007143530388/besouroEpisodes.txt | 2 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1176 -> 1306 bytes src/Spreadsheet.java | 92 +++++++++--------- 6 files changed, 52 insertions(+), 47 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 27c064b..a325a17 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -100,3 +100,6 @@ RefactoringAction 1475846080128 SpreadsheetTest.java ADD void test4()/2 METHOD EditAction 1475846096883 SpreadsheetTest.java 693 5 10 5 CompilationAction 1475846097101 SpreadsheetTest.java EditAction 1475846100097 SpreadsheetTest.java 693 5 10 5 +UnitTestCaseAction 1475846103485 SpreadsheetTest.java OK +UnitTestSessionAction 1475846103485 SpreadsheetTest.test5 OK +EditAction 1475846250328 Spreadsheet.java 2510 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index ed43912..acb86a9 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -20,3 +20,5 @@ 1475845352545 test-first 4 85 true 1475845352546 test-last 1 85 false 1475846044935 refactoring 2A 288 true +1475846103485 test-addition 1 23 true +1475846103486 test-addition 1 23 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index dd7fb85..348490a 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -6,3 +6,4 @@ 1475844546828 refactoring 2A 2 true 1475845352545 test-first 4 85 true 1475846044935 refactoring 2A 288 true +1475846103485 test-addition 1 23 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index d306460..3cf9e3e 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -6,3 +6,4 @@ 1475844546828 refactoring 2A 196 true 1475845352545 test-first 4 805 true 1475846044935 refactoring 2A 692 true +1475846103485 test-addition 1 58 true diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 0220ead063f11ecc5b1c3564eee7a6e730954268..32edaff7319bb80a44a821f93b4aa784b59c41d4 100644 GIT binary patch delta 89 zcmbQiIg5+y)W2Q(7#J8#7~D2;MKSTSmZTP!m~t>UGcs^LYM41WipidlZSyRqpNx|a tGAr>&2sv$IkkQ)0z%L{*`8~5VrxF7Iz*ph-*&t^jry6^j4> delta 36 scmbQmHG`Au)W2Q(7#J8#7@Rk9MKMjTWin-C-MpFUCnGBZ0~3Q20NQQ}761SM diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index f8f08a8..18a92eb 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -8,51 +8,6 @@ public class Spreadsheet { public String get(String cell) { - - if (cells.get(cells.lastIndexOf(cell)+1).startsWith("0") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("1") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("2") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("3") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("4") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("5") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("6") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("7") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("8") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("9") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("-") || - cells.get(cells.lastIndexOf(cell)+1).startsWith("+")){ - - for(int i=1; i Date: Fri, 7 Oct 2016 16:18:13 +0300 Subject: [PATCH 29/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/Spreadsheet.class | Bin 2310 -> 2329 bytes tests/SpreadsheetTest.java | 8 ++++---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index a325a17..4a54637 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -103,3 +103,4 @@ EditAction 1475846100097 SpreadsheetTest.java 693 5 10 5 UnitTestCaseAction 1475846103485 SpreadsheetTest.java OK UnitTestSessionAction 1475846103485 SpreadsheetTest.test5 OK EditAction 1475846250328 Spreadsheet.java 2510 3 5 0 +EditAction 1475846293555 SpreadsheetTest.java 713 5 10 5 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 4b3a09cfa7278a8532094d070a184d2c6396c439..c3f5263fb37049da76af2aa6e07223a517ffe4ba 100644 GIT binary patch delta 887 zcmX9+J4{ni82-+=?Y&26482e&4|!OiEv1D*fg(N-MXewpQVTwqAfi!hc+9xyABGFWwZV*`|M}{ zF~oJkN(U8^0;0D9t>_7$7is-gMDzXRr4z;&br)bi@mdg1QI3Y+shZ$Y3omdnNUq3qU+)@}uIupj}1bemJNRU#%) zO{)z-Yb9!Et@RQJ5#uj}1OhpY;WjM6RE-x z1mV&(JiOIAW`@_3Cfl3Ntc&iEbVEY_w4x48OYMsxZmQfqBN|!w-3$pm?F&1D?Bcr@ z$r^F!i4#V=^71D+|AF$Sjl1qeMvW+VV$6sUFMpo%J^rxo0+R`Ui+#!EHoE9M>Xs3LwKS_=v$8c>LehL5wHIGK2u zV1%0&;;|Yb#*+u4i3g(x??w~j)fg{AqW{_5%f9)&dGnt)yJoN0`3(w4Lnxy`)5frA?xlrCs7MONT^~rBkAvB_+|x(k0Qwl9uRZ>6SRk(k#)#lF*Zn z`_YFJ>WzpEpCtIAgY)zE=k>;*9~qot>+ba2?Zp{_QQt5mF~o~+%WFC@?8jNe337UF zY9TkfIHS$;dfo+Qb7~9c@^*jT zvFc^rLq9692WjlZW$eQP?8hSn@EkU_QG%}sVi%wMG%B6uJE^*BjX%3SW6mTA&}TYE~gj# z*K@fSYzuw@_-Q)QgF^K3v-;Gs8JcwN(+6>lZx%dm0%31xidE>-l-FNphL1g9fPV*2 S=I(O8GA5mHrx7L{y8a*H6QtV! diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 1880f34..6353a5f 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -17,22 +17,22 @@ public void test1() { @Test public void test2() { test.set("A2", "-1"); - assertTrue(test.get("A2").equals("-1")); + assertTrue(test.evaluate("A2").equals("-1")); } @Test public void test3() { test.set("A3", "5A"); - assertTrue(test.get("A3").equals("#Error")); + assertTrue(test.evaluate("A3").equals("#Error")); } @Test public void test4() { test.set("A1", "’a string’"); - assertTrue(test.get("A1").equals("a string")); + assertTrue(test.evaluate("A1").equals("a string")); } @Test public void test5() { test.set("A1", "’a string"); - assertTrue(test.get("A1").equals("#Error")); + assertTrue(test.evaluate("A1").equals("#Error")); } From 605559d74cfd7e6b2cd260a8d421e74a50c178de Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:23:07 +0300 Subject: [PATCH 30/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 1306 -> 1327 bytes src/Spreadsheet.java | 13 +++++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 4a54637..069f71a 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -104,3 +104,4 @@ UnitTestCaseAction 1475846103485 SpreadsheetTest.java OK UnitTestSessionAction 1475846103485 SpreadsheetTest.test5 OK EditAction 1475846250328 Spreadsheet.java 2510 3 5 0 EditAction 1475846293555 SpreadsheetTest.java 713 5 10 5 +EditAction 1475846587444 Spreadsheet.java 2884 3 5 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 32edaff7319bb80a44a821f93b4aa784b59c41d4..53666aaa40c6951fe9ef9d63ebc0bb6b2eb94609 100644 GIT binary patch delta 264 zcmbQmwVsRX)W2Q(7#J8#7(6#}aWU0%G4L>$@i3S(C^Ir}q?RS-lqQy>GBU81q!yPL zb1+yjGB7y;X&WGI>d3)h$H>5@>{?WmUj$WS!olFk$iVlgVP>L2aY<2TUOJG;!Qc!u z4JH6pY0AOi#>l{pq>_<=YjYiwG9$C8kn!aEEMk*)G0QPpOfFzn7PJ(y-o_xKwS|FS x$Z{KlsgNyLUYSLX(H<->A>;s)mjKB-f#rLE@-9$$R}^`WeiL?gpvRdQJOF}&KtKQh delta 226 zcmZ3_HH(Yu)W2Q(7#J8#7~D2;aWO?QGO(7U7MB=vFqktkFgXHgOCW9P$iZOE$iSxT zT2z!@1XW|g!C=S8!1t(OW}-rINl|8AI*`f1;K0bh0TY0#H05A$-rU4w!pN*3WIQ>5 zS#0uoW;sUF$p=`J1B|x(FVA+L0 XSx2y}6N)TEFBhvEy9>}uObo67nQ1kn diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 18a92eb..8854804 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -3,11 +3,9 @@ public class Spreadsheet { ArrayList cells=new ArrayList(); - - public String get(String cell) { - + return cells.get(cells.lastIndexOf(cell)+1); } @@ -59,7 +57,14 @@ public String evaluate(String cell) { return "#Error"; } - + }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("=")){ + if(cells.get(cells.lastIndexOf(cell)+1).substring(1,2).equals("’")){ + if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ + return cells.get(cells.lastIndexOf(cell)+1).substring(2,cells.get(cells.lastIndexOf(cell)+1).length()-1); + }else{ + return "#Error"; + } + } }else{ return cells.get(cells.lastIndexOf(cell)+1); } From 6bcf96196e8589868b8d774ee614fcf0a5025169 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:23:45 +0300 Subject: [PATCH 31/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 2329 -> 2521 bytes tests/SpreadsheetTest.java | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 069f71a..fe30d99 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -105,3 +105,6 @@ UnitTestSessionAction 1475846103485 SpreadsheetTest.test5 OK EditAction 1475846250328 Spreadsheet.java 2510 3 5 0 EditAction 1475846293555 SpreadsheetTest.java 713 5 10 5 EditAction 1475846587444 Spreadsheet.java 2884 3 5 0 +RefactoringAction 1475846596961 SpreadsheetTest.java ADD void test5()/2 METHOD +RefactoringAction 1475846600050 SpreadsheetTest.java RENAME test5()/2=>void test6() METHOD +EditAction 1475846625572 SpreadsheetTest.java 832 6 12 6 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index c3f5263fb37049da76af2aa6e07223a517ffe4ba..acccc7eaa2b48516ce09a48290e5e5f58142d056 100644 GIT binary patch delta 382 zcmW-d%PWLo7{!0j`+j3)zFfzQ`)y|2#;JYuSB`8h?SUWD;d% zWo0ATNGbUTY z?R{rdzlz_9T2uaf{1gzN$T_mQY>(hUgH`Ah-W^|HHbY06Z*~~_sy;b7LDxYuo@Qg+S6Qqg|y_7ITDZ7+$LOJJDa8D&~=KDjnlu;vb zYGs13B#20osHCWuD;ng9M){&ig=kjY#8iS7m84arXj50Tt7|&d17Y<^m-Z6ZQF?TO zzAZh&fIeVQrx?-~4C{AB^ao?wW!zw4X2~`+cqQgCorw@dWKvF9Vj0DXvCFYtnfSpH VS5|}HRJ&{{mtz$~STzB~+8_FzM(h9p delta 286 zcmXAjJxfAi7>2Lsc~7XPrPNdQVQQ!EPYMeug6J1WDMY40TSL&|90@hG9SrIhv_=Tg z5Clz54K=hxW6<1^61~tp-CQ@^TyL?BjMM2Q7g z&Z6s-=)i!f1&<-`_RD!u<<$0*;5nQ+J|kmKdKjda90>~aaYR4o3~+7f6G=W8qD@K? zq$Nv6^7v9@M5>HRoiS-JF0V|;H(47M_RHU{~_7pK;sByJ1Uhw D_&GHC diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 6353a5f..eb6ca48 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -33,6 +33,10 @@ public void test4() { public void test5() { test.set("A1", "’a string"); assertTrue(test.evaluate("A1").equals("#Error")); + }@Test + public void test6() { + test.set("B1", "=’a string"); + assertTrue(test.evaluate("B1").equals("#Error")); } From 5d79c0f286acdd542aaf3b136ea823b04c301d2b Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:24:29 +0300 Subject: [PATCH 32/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 4 ++++ bin/SpreadsheetTest.class | Bin 1327 -> 1466 bytes tests/SpreadsheetTest.java | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index fe30d99..e6b3392 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -108,3 +108,7 @@ EditAction 1475846587444 Spreadsheet.java 2884 3 5 0 RefactoringAction 1475846596961 SpreadsheetTest.java ADD void test5()/2 METHOD RefactoringAction 1475846600050 SpreadsheetTest.java RENAME test5()/2=>void test6() METHOD EditAction 1475846625572 SpreadsheetTest.java 832 6 12 6 +RefactoringAction 1475846629909 SpreadsheetTest.java RENAME test6()=>void test7() METHOD +RefactoringAction 1475846639690 SpreadsheetTest.java ADD void test5()/2 METHOD +RefactoringAction 1475846644323 SpreadsheetTest.java RENAME test5()/2=>void test6() METHOD +EditAction 1475846669221 SpreadsheetTest.java 954 7 14 7 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 53666aaa40c6951fe9ef9d63ebc0bb6b2eb94609..dd9c3fff957b37420d901955014f1009d67d2708 100644 GIT binary patch delta 95 zcmZ3_wTqkU)W2Q(7#J8#82mPJbufvtmZTP!m~k+8GBPkZ8FDaqGcxelPHts#Vr1WZ zf+>k<@*rm;AT)~kYUi6?8qX@?gKQBiNO~Drf3ym delta 36 scmdnRy`GEf)W2Q(7#J8#7(6#}budld!eq+Gw)quP5)&%}0~3P>0OutNVgLXD diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index eb6ca48..f041c01 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -35,6 +35,10 @@ public void test5() { assertTrue(test.evaluate("A1").equals("#Error")); }@Test public void test6() { + test.set("A1", "=’a string’"); + assertTrue(test.evaluate("A1").equals("a string")); + }@Test + public void test7() { test.set("B1", "=’a string"); assertTrue(test.evaluate("B1").equals("#Error")); } From bb5592574932f392dff9b181d0c914c564ad2819 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:31:55 +0300 Subject: [PATCH 33/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 8 +++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1466 -> 1600 bytes src/Spreadsheet.java | 22 +++++++++--------- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index e6b3392..861bd3f 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -112,3 +112,6 @@ RefactoringAction 1475846629909 SpreadsheetTest.java RENAME test6()=>void test7( RefactoringAction 1475846639690 SpreadsheetTest.java ADD void test5()/2 METHOD RefactoringAction 1475846644323 SpreadsheetTest.java RENAME test5()/2=>void test6() METHOD EditAction 1475846669221 SpreadsheetTest.java 954 7 14 7 +UnitTestCaseAction 1475846671002 SpreadsheetTest.java OK +UnitTestSessionAction 1475846671002 SpreadsheetTest.java OK +EditAction 1475847115150 Spreadsheet.java 3124 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index acb86a9..b363f23 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -22,3 +22,11 @@ 1475846044935 refactoring 2A 288 true 1475846103485 test-addition 1 23 true 1475846103486 test-addition 1 23 true +1475846671002 test-last 1 420 false +1475846671003 test-last 1 420 false +1475846671004 test-last 1 420 false +1475846671005 test-last 1 420 false +1475846671006 test-last 1 420 false +1475846671007 test-last 1 420 false +1475846671008 test-last 1 420 false +1475846671009 test-last 1 420 false diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 348490a..41806d1 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -7,3 +7,4 @@ 1475845352545 test-first 4 85 true 1475846044935 refactoring 2A 288 true 1475846103485 test-addition 1 23 false +1475846671002 test-last 1 420 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 3cf9e3e..bbbe461 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -7,3 +7,4 @@ 1475845352545 test-first 4 805 true 1475846044935 refactoring 2A 692 true 1475846103485 test-addition 1 58 true +1475846671002 test-last 1 567 false diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index dd9c3fff957b37420d901955014f1009d67d2708..993349bbd186476f49a9d2a3ecbce07a86178d12 100644 GIT binary patch delta 123 zcmdnReSnAS)W2Q(7#J8#7y>tPO=eQ&w|&$wGf|R@8<1ps1t59j~@ diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 8854804..e68a949 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -6,7 +6,7 @@ public class Spreadsheet { public String get(String cell) { - return cells.get(cells.lastIndexOf(cell)+1); + return cells.get(cells.lastIndexOf(cell)+1); // 1 } @@ -17,7 +17,7 @@ public void set(String cell, String value) { } public String evaluate(String cell) { - if (cells.get(cells.lastIndexOf(cell)+1).startsWith("0") || + if (cells.get(cells.lastIndexOf(cell)+1).startsWith("0") || // starts with numbers or signs cells.get(cells.lastIndexOf(cell)+1).startsWith("1") || cells.get(cells.lastIndexOf(cell)+1).startsWith("2") || cells.get(cells.lastIndexOf(cell)+1).startsWith("3") || @@ -31,7 +31,7 @@ public String evaluate(String cell) { cells.get(cells.lastIndexOf(cell)+1).startsWith("+")){ for(int i=1; i Date: Fri, 7 Oct 2016 16:36:12 +0300 Subject: [PATCH 34/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + src/Spreadsheet.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 861bd3f..b6488a3 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -115,3 +115,4 @@ EditAction 1475846669221 SpreadsheetTest.java 954 7 14 7 UnitTestCaseAction 1475846671002 SpreadsheetTest.java OK UnitTestSessionAction 1475846671002 SpreadsheetTest.java OK EditAction 1475847115150 Spreadsheet.java 3124 3 5 0 +EditAction 1475847372349 Spreadsheet.java 3308 3 5 0 diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e68a949..d791b28 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -64,6 +64,8 @@ public String evaluate(String cell) { }else{ return "#Error"; // 7 } + }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ + return cells.get(cells.lastIndexOf(cells.get(cells.lastIndexOf(cell)+1).substring(1))+1); } }else{ return cells.get(cells.lastIndexOf(cell)+1); From d0114e58f4bf5fda2a7fa9abce1fa4222db2dbec Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:37:43 +0300 Subject: [PATCH 35/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 2521 -> 2631 bytes tests/SpreadsheetTest.java | 12 ++++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index b6488a3..049d5a2 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -116,3 +116,6 @@ UnitTestCaseAction 1475846671002 SpreadsheetTest.java OK UnitTestSessionAction 1475846671002 SpreadsheetTest.java OK EditAction 1475847115150 Spreadsheet.java 3124 3 5 0 EditAction 1475847372349 Spreadsheet.java 3308 3 5 0 +RefactoringAction 1475847380976 SpreadsheetTest.java ADD void test7()/2 METHOD +RefactoringAction 1475847424734 SpreadsheetTest.java RENAME test7()/2=>void test8() METHOD +EditAction 1475847463656 SpreadsheetTest.java 1066 8 16 8 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index acccc7eaa2b48516ce09a48290e5e5f58142d056..3dbda9ff5424502d92300fe3f42706d1aff80a40 100644 GIT binary patch delta 238 zcmca9d|ZU<)W2Q(7#J8#7}7U#g)ob7G4L@Y@GvAYXfiTzB~1YnH1_jEO*I2jgKNDKa^ZgNHE$$dZ`+6^LhZXih%LE+E9Rjlp9Z zL;Oqz7p*M}f*=f1%mNage3V0R@hWbkAV0Xj+n zVj+VlgBXwpw3N(`llDCNv6$iYS1%0*$hI62@YT&EOIVN(tcuF3-_uiz1k zFw5=xug~`)?-}>{KAizHF%4ax9~OL04#5HkL`sFWJbc8BQ6`e=5ns|OQb}PQ(NB9v z47Qm4x|m&1d%LbWc0x6r65pYwdXDm2T%!$XKFWV6vd9@{@Ti~)B9As0Vg!b%_Inc88A$~f1fIP diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index f041c01..77def38 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -26,8 +26,8 @@ public void test3() { } @Test public void test4() { - test.set("A1", "’a string’"); - assertTrue(test.evaluate("A1").equals("a string")); + test.set("A4", "’an animal’"); + assertTrue(test.evaluate("A4").equals("an animal")); } @Test public void test5() { @@ -35,13 +35,17 @@ public void test5() { assertTrue(test.evaluate("A1").equals("#Error")); }@Test public void test6() { - test.set("A1", "=’a string’"); - assertTrue(test.evaluate("A1").equals("a string")); + test.set("A5", "=’a string’"); + assertTrue(test.evaluate("A5").equals("a string")); }@Test public void test7() { test.set("B1", "=’a string"); assertTrue(test.evaluate("B1").equals("#Error")); } + public void test8() { + test.set("B2", "=A4"); + assertTrue(test.evaluate("B2").equals("an animal")); + } From 930a9ffb231a42ed646d69eaf38b8b5c51a99531 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:37:56 +0300 Subject: [PATCH 36/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 4 ++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1600 -> 1750 bytes tests/SpreadsheetTest.java | 1 + 6 files changed, 10 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 049d5a2..f1b3a43 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -119,3 +119,6 @@ EditAction 1475847372349 Spreadsheet.java 3308 3 5 0 RefactoringAction 1475847380976 SpreadsheetTest.java ADD void test7()/2 METHOD RefactoringAction 1475847424734 SpreadsheetTest.java RENAME test7()/2=>void test8() METHOD EditAction 1475847463656 SpreadsheetTest.java 1066 8 16 8 +UnitTestCaseAction 1475847465313 SpreadsheetTest.java OK +UnitTestSessionAction 1475847465313 SpreadsheetTest.java OK +EditAction 1475847476841 SpreadsheetTest.java 1073 8 16 8 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index b363f23..8c828bd 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -30,3 +30,7 @@ 1475846671007 test-last 1 420 false 1475846671008 test-last 1 420 false 1475846671009 test-last 1 420 false +1475847465313 test-last 1 350 false +1475847465314 test-last 1 350 false +1475847465315 test-last 1 350 false +1475847465316 test-last 1 350 false diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 41806d1..f1c9d1c 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -8,3 +8,4 @@ 1475846044935 refactoring 2A 288 true 1475846103485 test-addition 1 23 false 1475846671002 test-last 1 420 false +1475847465313 test-last 1 350 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index bbbe461..d8f25e8 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -8,3 +8,4 @@ 1475846044935 refactoring 2A 692 true 1475846103485 test-addition 1 58 true 1475846671002 test-last 1 567 false +1475847465313 test-last 1 794 false diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 993349bbd186476f49a9d2a3ecbce07a86178d12..f5d598c21463382ce7e9d0de3f94fe1a4ddaafc8 100644 GIT binary patch delta 366 zcmX@WbB&kl)W2Q(7#J8#7-BYZ1u)e!Iht@VI5RTvKWdnnn5U4KmzkTG17veBxH2+u z!bKPvSW8liOH4T!JQx|cL24C>ONuh{(xDP&91Px!3`~wd1-?MTY>`xe4fAJY;6T%2 z&cP7GsL#OUWXQn~!pOjbtOshU1qVYo&{QWQ4u(iZ24-7Flga0q%o#a1vomjE6m$@B z+QuNGwS|FS$YC3UsgTR$L>95h4_M?F-6mgTRpyZpa)-%FOk$Is?8z#}=n0Y$^b+!c z$#{Wu`hj(B0?G$~bp{Fr!{h@ev01W)GH@_3PJYNLEEpyf0h0-X+sUcNz|Ek~Aj4oV Pxq(HLJqj4SObpQgi@RK9 delta 241 zcmcb{dw_@Q)W2Q(7#J8#7y>tP1u$vwJ!+Vls8C!|l$neoQkUSN4| ZAzzrhH^?+wuxTM|a_s& Date: Fri, 7 Oct 2016 16:39:06 +0300 Subject: [PATCH 37/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 1750 -> 1762 bytes tests/SpreadsheetTest.java | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index f1b3a43..4eb6909 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -122,3 +122,6 @@ EditAction 1475847463656 SpreadsheetTest.java 1066 8 16 8 UnitTestCaseAction 1475847465313 SpreadsheetTest.java OK UnitTestSessionAction 1475847465313 SpreadsheetTest.java OK EditAction 1475847476841 SpreadsheetTest.java 1073 8 16 8 +UnitTestCaseAction 1475847477983 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847477983 SpreadsheetTest.java FAIL +EditAction 1475847546748 SpreadsheetTest.java 1098 8 17 8 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f5d598c21463382ce7e9d0de3f94fe1a4ddaafc8..e4251fb6f9b2e5142f168a2d353204bc5944a3c8 100644 GIT binary patch delta 33 pcmcb{`-pc#8QbI~tO}F6*wi`o8Mqk?7-Sd>CkL>IPCn1Z4gjwx2+#lk delta 39 vcmaFFdyRKP85<+x Date: Fri, 7 Oct 2016 16:41:55 +0300 Subject: [PATCH 38/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1762 -> 1789 bytes tests/SpreadsheetTest.java | 6 +++++- 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 4eb6909..8248e3a 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -125,3 +125,8 @@ EditAction 1475847476841 SpreadsheetTest.java 1073 8 16 8 UnitTestCaseAction 1475847477983 SpreadsheetTest.java FAIL UnitTestSessionAction 1475847477983 SpreadsheetTest.java FAIL EditAction 1475847546748 SpreadsheetTest.java 1098 8 17 8 +UnitTestCaseAction 1475847548826 SpreadsheetTest.java OK +UnitTestSessionAction 1475847548826 SpreadsheetTest.java OK +RefactoringAction 1475847665139 SpreadsheetTest.java ADD void test8()/2 METHOD +RefactoringAction 1475847669258 SpreadsheetTest.java RENAME test8()/2=>void test9() METHOD +EditAction 1475847715232 SpreadsheetTest.java 1227 9 20 9 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 8c828bd..58c82db 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -34,3 +34,4 @@ 1475847465314 test-last 1 350 false 1475847465315 test-last 1 350 false 1475847465316 test-last 1 350 false +1475847548826 refactoring 1A 71 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index f1c9d1c..0a7c111 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -9,3 +9,4 @@ 1475846103485 test-addition 1 23 false 1475846671002 test-last 1 420 false 1475847465313 test-last 1 350 false +1475847548826 refactoring 1A 71 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index d8f25e8..49d9720 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -9,3 +9,4 @@ 1475846103485 test-addition 1 58 true 1475846671002 test-last 1 567 false 1475847465313 test-last 1 794 false +1475847548826 refactoring 1A 83 false diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index e4251fb6f9b2e5142f168a2d353204bc5944a3c8..18ab39b9723efbcab8f1a4071f1fd613a10d631c 100644 GIT binary patch delta 149 zcmaFF`Eh-747ax&szh~CV^+{T<4$H2_M z2vnz`wS|FS$U!J<8-om(86gw}XKrIK1xcvvV9?qKRLjI52qc9VSb(HH12=;KgBXJ$ cgF1r|P>g|r2Vx$BFoOt?$H))^B$*gu0U+oa9{>OV delta 78 zcmey%`-qq8)W2Q(7#J8#7-BYZePUu`ax&szh}_J_+{Qfl0}G#Em{7zv1{tj_4E#c2 i+ZarRTqZwc730)r;ASvjkYO;K#3srf1=P;O5DfsCs}nT< diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 378199a..3a14aa5 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -48,7 +48,11 @@ public void test8() { test.set("B2", "=A4"); assertTrue(test.evaluate("B2").equals("wizard")); } - + public void test9() { + test.set("A5", "5A"); + test.set("A1", "=A5"); + assertTrue(test.evaluate("B2").equals("#Error")); + } } \ No newline at end of file From aca217e9fe39e18002a42c5d693407bd6215b8f9 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:41:59 +0300 Subject: [PATCH 39/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 1789 -> 1914 bytes src/Spreadsheet.java | 3 ++- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 8248e3a..5e1f856 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -130,3 +130,4 @@ UnitTestSessionAction 1475847548826 SpreadsheetTest.java OK RefactoringAction 1475847665139 SpreadsheetTest.java ADD void test8()/2 METHOD RefactoringAction 1475847669258 SpreadsheetTest.java RENAME test8()/2=>void test9() METHOD EditAction 1475847715232 SpreadsheetTest.java 1227 9 20 9 +EditAction 1475847719304 Spreadsheet.java 3327 3 5 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 18ab39b9723efbcab8f1a4071f1fd613a10d631c..0314845b136e51a7794c0e4d94e61e8aa93c7fc6 100644 GIT binary patch delta 126 zcmey%`-_k3)W2Q(7#J8#7!o&f@i6nVmZTP!SaLALF)}dQI+{)vVK!&v+U&!;hFO<` zfsug|s5Fj&8OUN_(9qh#z%S$_WW9|+2F#QYiiI&FCNE?WoqUdsjn{;Mo57SpjKPdS SoxyzaLpD+Nc%WV;h6Dg4 Date: Fri, 7 Oct 2016 16:42:35 +0300 Subject: [PATCH 40/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 2 ++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 3 ++- bin/Spreadsheet.class | Bin 2631 -> 2631 bytes tests/SpreadsheetTest.java | 5 +++-- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 5e1f856..7056c4c 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -131,3 +131,6 @@ RefactoringAction 1475847665139 SpreadsheetTest.java ADD void test8()/2 METHOD RefactoringAction 1475847669258 SpreadsheetTest.java RENAME test8()/2=>void test9() METHOD EditAction 1475847715232 SpreadsheetTest.java 1227 9 20 9 EditAction 1475847719304 Spreadsheet.java 3327 3 5 0 +UnitTestCaseAction 1475847720726 SpreadsheetTest.java OK +UnitTestSessionAction 1475847720726 SpreadsheetTest.java OK +EditAction 1475847755577 SpreadsheetTest.java 1234 9 20 9 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 58c82db..7d56f79 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -35,3 +35,5 @@ 1475847465315 test-last 1 350 false 1475847465316 test-last 1 350 false 1475847548826 refactoring 1A 71 true +1475847720726 test-first 4 55 true +1475847720727 test-first 4 55 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 0a7c111..052ddcb 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -10,3 +10,4 @@ 1475846671002 test-last 1 420 false 1475847465313 test-last 1 350 false 1475847548826 refactoring 1A 71 true +1475847720726 test-first 4 55 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 49d9720..d44c42b 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -9,4 +9,5 @@ 1475846103485 test-addition 1 58 true 1475846671002 test-last 1 567 false 1475847465313 test-last 1 794 false -1475847548826 refactoring 1A 83 false +1475847548826 refactoring 1A 83 true +1475847720726 test-first 4 171 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 3dbda9ff5424502d92300fe3f42706d1aff80a40..a9fbd8e28ac6f7d3f083583f63b8339ef2d51c2e 100644 GIT binary patch delta 21 ccmX>ua$ID?8%|DF783>!7EcDR$zM5x08cLlqyPW_ delta 21 ccmX>ua$ID?8%|Ca783?{7EcDx$zM5x08bPKp#T5? diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 3a14aa5..874117c 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -48,9 +48,10 @@ public void test8() { test.set("B2", "=A4"); assertTrue(test.evaluate("B2").equals("wizard")); } + @Test public void test9() { - test.set("A5", "5A"); - test.set("A1", "=A5"); + test.set("A6", "5A"); + test.set("A1", "=A6"); assertTrue(test.evaluate("B2").equals("#Error")); } From 69448ac29fb19f148228a3c882c1795033a075cd Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:44:10 +0300 Subject: [PATCH 41/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 1914 -> 1934 bytes src/Spreadsheet.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 7056c4c..b1a529d 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -134,3 +134,6 @@ EditAction 1475847719304 Spreadsheet.java 3327 3 5 0 UnitTestCaseAction 1475847720726 SpreadsheetTest.java OK UnitTestSessionAction 1475847720726 SpreadsheetTest.java OK EditAction 1475847755577 SpreadsheetTest.java 1234 9 20 9 +UnitTestCaseAction 1475847758247 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847758247 SpreadsheetTest.java FAIL +EditAction 1475847850397 Spreadsheet.java 3305 3 5 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 0314845b136e51a7794c0e4d94e61e8aa93c7fc6..40381d259184bbee51cd710f9dfcd277cdc20ce6 100644 GIT binary patch delta 116 zcmeyx*T>Iw>ff$?3=9k=49Oe0#F=@R9L+cw5*QhnZ5_=vt1>@hp1g%wNG6VfnSl|g zN<(W41HVwLko7hO88A~qD1NdoyNaeM12=;igBXK3gF1r+gAhff$?3=9k=42c`L#F<%`Z5>TF>oPxMR$^q}1d7KoFf%X$X$`F{4E#b~ zLe|?DWWY=bq1efe>?)cj4BQN+3}Oss4C)N#3_?JqJP-{G!VDrn9wS3MkYr*=007@7 B5c&WB diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index de3aea2..d882585 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -66,7 +66,7 @@ public String evaluate(String cell) { } }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ // 8 =A1 - return cells.get(cells.lastIndexOf(cells.get(cells.lastIndexOf(cell)+1).substring(1))+1); + return evaluate(cells.get(cells.lastIndexOf(cell)+1).substring(1)); } }else{ return cells.get(cells.lastIndexOf(cell)+1); From 7a8fce8b4a6110ef9f530117aedd9f8c09bb226e Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:44:40 +0300 Subject: [PATCH 42/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 2631 -> 2624 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index b1a529d..163a3c1 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -137,3 +137,6 @@ EditAction 1475847755577 SpreadsheetTest.java 1234 9 20 9 UnitTestCaseAction 1475847758247 SpreadsheetTest.java FAIL UnitTestSessionAction 1475847758247 SpreadsheetTest.java FAIL EditAction 1475847850397 Spreadsheet.java 3305 3 5 0 +UnitTestCaseAction 1475847852069 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847852069 SpreadsheetTest.java FAIL +EditAction 1475847880617 SpreadsheetTest.java 1234 9 20 9 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index a9fbd8e28ac6f7d3f083583f63b8339ef2d51c2e..313494e6410e374a9219c182cde6fdc204a2de1e 100644 GIT binary patch delta 165 zcmX>uazKRZ)W2Q(7#J8#7&13?Mp_z^r19dL~mXFq5B?jVWmZm}$(p+gO#sgT;!$i$Mfvfda%B w22lnvAP;CDgA#)>10!P)<1~g8hExV7hBTnC)MQ022_8EUpexdWTqcGL07K>?CjbBd delta 173 zcmX>ga$JP#)W2Q(7#J8#7}7U#WioHBWzJ{hjACGAU}j)oiJL6QD!Q4A^(qr%B8WNp zD|<2HVIWInaxF(ar;FAW20;)8i3qT4WANCj@h%$%)c|aQ&lo*s57#V{Yr!gckBr`BEqyU9wCd+V1@cm}+6=7gxNCgTo HF{A+iUOppx diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 874117c..1a0383a 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -52,7 +52,7 @@ public void test8() { public void test9() { test.set("A6", "5A"); test.set("A1", "=A6"); - assertTrue(test.evaluate("B2").equals("#Error")); + assertTrue(test.evaluate("A1").equals("#Error")); } From 48977ad51eefddf1f011741ec7355b27c72b19cb Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:47:01 +0300 Subject: [PATCH 43/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1934 -> 1934 bytes tests/SpreadsheetTest.java | 4 ++-- 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 163a3c1..c48a1dc 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -140,3 +140,6 @@ EditAction 1475847850397 Spreadsheet.java 3305 3 5 0 UnitTestCaseAction 1475847852069 SpreadsheetTest.java FAIL UnitTestSessionAction 1475847852069 SpreadsheetTest.java FAIL EditAction 1475847880617 SpreadsheetTest.java 1234 9 20 9 +UnitTestCaseAction 1475847882303 SpreadsheetTest.java OK +UnitTestSessionAction 1475847882303 SpreadsheetTest.java OK +EditAction 1475848021237 SpreadsheetTest.java 1234 9 20 9 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 7d56f79..7dfe8ff 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -37,3 +37,4 @@ 1475847548826 refactoring 1A 71 true 1475847720726 test-first 4 55 true 1475847720727 test-first 4 55 true +1475847882303 refactoring 2A 126 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 052ddcb..d2c4c41 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -11,3 +11,4 @@ 1475847465313 test-last 1 350 false 1475847548826 refactoring 1A 71 true 1475847720726 test-first 4 55 true +1475847882303 refactoring 2A 126 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index d44c42b..626545a 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -11,3 +11,4 @@ 1475847465313 test-last 1 794 false 1475847548826 refactoring 1A 83 true 1475847720726 test-first 4 171 true +1475847882303 refactoring 2A 161 true diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 40381d259184bbee51cd710f9dfcd277cdc20ce6..f53854d29097baac3f421d2ed86012ea0ee6c87e 100644 GIT binary patch delta 13 UcmeC<@8jR#$<8P-*^Au;02@jJd;kCd delta 13 UcmeC<@8jR#$<7!t*^Au;033<~yZ`_I diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 1a0383a..1ab7acb 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -51,8 +51,8 @@ public void test8() { @Test public void test9() { test.set("A6", "5A"); - test.set("A1", "=A6"); - assertTrue(test.evaluate("A1").equals("#Error")); + test.set("C6", "=A6"); + assertTrue(test.evaluate("C6").equals("#Error")); } From 4540b5a1e9764f74f305109ea6a0098b0c42a6c6 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:47:04 +0300 Subject: [PATCH 44/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 1934 -> 1942 bytes src/Spreadsheet.java | 3 ++- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index c48a1dc..867d132 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -143,3 +143,4 @@ EditAction 1475847880617 SpreadsheetTest.java 1234 9 20 9 UnitTestCaseAction 1475847882303 SpreadsheetTest.java OK UnitTestSessionAction 1475847882303 SpreadsheetTest.java OK EditAction 1475848021237 SpreadsheetTest.java 1234 9 20 9 +EditAction 1475848024435 Spreadsheet.java 3326 3 3 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f53854d29097baac3f421d2ed86012ea0ee6c87e..fbd7770ead8f07c0d13cb3cb9698dc3c8430ad43 100644 GIT binary patch delta 56 zcmeCff$?3=9k=45=Hrff$?3=9k=49Oe0O9;hJ?q-#n{GN?%axS|Pdm>N)6GIXJ DT|f*` diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index d882585..0ef4307 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -64,7 +64,8 @@ public String evaluate(String cell) { }else{ return "#Error"; // 7 } - }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ // 8 =A1 + }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ // 8 =A1 ALSO 9 + if() return evaluate(cells.get(cells.lastIndexOf(cell)+1).substring(1)); } From c9c1f7e99432432c0c00e3e33b294eab5ee2b9b0 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:54:15 +0300 Subject: [PATCH 45/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 5 +++++ .../20161007143530388/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/Spreadsheet.class | Bin 2624 -> 2624 bytes src/Spreadsheet.java | 10 +++++++--- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 867d132..18f4bbc 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -144,3 +144,8 @@ UnitTestCaseAction 1475847882303 SpreadsheetTest.java OK UnitTestSessionAction 1475847882303 SpreadsheetTest.java OK EditAction 1475848021237 SpreadsheetTest.java 1234 9 20 9 EditAction 1475848024435 Spreadsheet.java 3326 3 3 0 +CompilationAction 1475848024653 Spreadsheet.java +CompilationAction 1475848039318 Spreadsheet.java +UnitTestCaseAction 1475848041021 SpreadsheetTest.java OK +UnitTestSessionAction 1475848041021 SpreadsheetTest.java OK +EditAction 1475848455795 Spreadsheet.java 3551 3 5 0 diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 7dfe8ff..640aea1 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -38,3 +38,4 @@ 1475847720726 test-first 4 55 true 1475847720727 test-first 4 55 true 1475847882303 refactoring 2A 126 true +1475848041021 refactoring 2A 19 true diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index d2c4c41..0bb3269 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -12,3 +12,4 @@ 1475847548826 refactoring 1A 71 true 1475847720726 test-first 4 55 true 1475847882303 refactoring 2A 126 false +1475848041021 refactoring 2A 19 true diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index 626545a..f954400 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -12,3 +12,4 @@ 1475847548826 refactoring 1A 83 true 1475847720726 test-first 4 171 true 1475847882303 refactoring 2A 161 true +1475848041021 refactoring 2A 158 true diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 313494e6410e374a9219c182cde6fdc204a2de1e..30eeff7e251c784c13c42e96bfa98330a5f497b9 100644 GIT binary patch delta 21 ccmX>gazJFmb52e-7F7mM7Apqt$safa08GOMZvX%Q delta 21 ccmX>gazJFmb52fI7F7lh7App?$safa08FR`YybcN diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 0ef4307..52b4664 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -64,10 +64,14 @@ public String evaluate(String cell) { }else{ return "#Error"; // 7 } - }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ // 8 =A1 ALSO 9 - if() + }else if(cells.contains(cells.get(cells.lastIndexOf(cell)+1).substring(1))){ // 8 =A1 ALSO 9 + if(cells.get(cells.lastIndexOf(cells.get(cells.lastIndexOf(cell)+1).substring(1))+1).equals("=" + cell)){ + return "#Circular"; // 10 + }else{ + return evaluate(cells.get(cells.lastIndexOf(cell)+1).substring(1)); // 8 =A1 ALSO 9 + } + - return evaluate(cells.get(cells.lastIndexOf(cell)+1).substring(1)); } }else{ return cells.get(cells.lastIndexOf(cell)+1); From 2ed773809d7680f000e2176f555d8904f3a9ff30 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:55:00 +0300 Subject: [PATCH 46/50] besouro automatic message --- .besouro/20161007143530388/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 2624 -> 2892 bytes tests/SpreadsheetTest.java | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 18f4bbc..4ab1701 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -149,3 +149,6 @@ CompilationAction 1475848039318 Spreadsheet.java UnitTestCaseAction 1475848041021 SpreadsheetTest.java OK UnitTestSessionAction 1475848041021 SpreadsheetTest.java OK EditAction 1475848455795 Spreadsheet.java 3551 3 5 0 +RefactoringAction 1475848464516 SpreadsheetTest.java ADD void test9()/2 METHOD +RefactoringAction 1475848468119 SpreadsheetTest.java RENAME test9()/2=>void test10() METHOD +EditAction 1475848500068 SpreadsheetTest.java 1377 10 23 10 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 30eeff7e251c784c13c42e96bfa98330a5f497b9..4fc2f3e1655f257e817b67cfcadc32e582134dcc 100644 GIT binary patch delta 362 zcmXX?PfG%E6rAU-=`IVQ>}~~FmIS7h1l>9W{h@-Qs8i9QRX1DPR$EuIL-iqkVD%L` z8O8<$;W@f??OOyv5dAhgJeW7k4D()BebeRFpQjf9vuNJSmXM90Ko}?+4I^h8PARwJ zxt3E}s9Sc?bY|NE}~b` zdFBDJU;<`R^s(w=NIdY7=py-y{BC^j5yh;Jl8<8_`?u(eSK66C9qp-4+kaux(x`BU z4BL{f=aYPqMVI#8M{|$3k L<>xdw7sA;u6rxmT delta 188 zcmXAjzYoDs9K`SY`YP?SJ{=@Ph(s(5x^yr~#DH$r`q{lZv-KtH{sK)+1~D1L?2l0q zPi>#OT<-4ST&1{w&KCe3gs}(>Q-Cl{Tpp3#hY17VL$$GFax?b{5N1uBbK=sTnA_ diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 1ab7acb..181e3bf 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -54,6 +54,12 @@ public void test9() { test.set("C6", "=A6"); assertTrue(test.evaluate("C6").equals("#Error")); } + @Test + public void test10() { + test.set("O6", "=P6"); + test.set("P6", "=O6"); + assertTrue(test.evaluate("P6").equals("#Circular")); + } } \ No newline at end of file From 13bd90ef1f3129b4eac8900239e113722c06d885 Mon Sep 17 00:00:00 2001 From: atatlisu Date: Fri, 7 Oct 2016 16:57:07 +0300 Subject: [PATCH 47/50] not finished yet --- .besouro/20161007143530388/actions.txt | 2 ++ .../20161007143530388/besouroEpisodes.txt | 2 ++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20161007143530388/zorroEpisodes.txt | 1 + bin/SpreadsheetTest.class | Bin 1942 -> 2120 bytes 5 files changed, 6 insertions(+) diff --git a/.besouro/20161007143530388/actions.txt b/.besouro/20161007143530388/actions.txt index 4ab1701..c924ca8 100644 --- a/.besouro/20161007143530388/actions.txt +++ b/.besouro/20161007143530388/actions.txt @@ -152,3 +152,5 @@ EditAction 1475848455795 Spreadsheet.java 3551 3 5 0 RefactoringAction 1475848464516 SpreadsheetTest.java ADD void test9()/2 METHOD RefactoringAction 1475848468119 SpreadsheetTest.java RENAME test9()/2=>void test10() METHOD EditAction 1475848500068 SpreadsheetTest.java 1377 10 23 10 +UnitTestCaseAction 1475848501574 SpreadsheetTest.java OK +UnitTestSessionAction 1475848501574 SpreadsheetTest.java OK diff --git a/.besouro/20161007143530388/besouroEpisodes.txt b/.besouro/20161007143530388/besouroEpisodes.txt index 640aea1..bc3286a 100644 --- a/.besouro/20161007143530388/besouroEpisodes.txt +++ b/.besouro/20161007143530388/besouroEpisodes.txt @@ -39,3 +39,5 @@ 1475847720727 test-first 4 55 true 1475847882303 refactoring 2A 126 true 1475848041021 refactoring 2A 19 true +1475848501574 test-last 1 45 false +1475848501575 test-last 1 45 false diff --git a/.besouro/20161007143530388/randomHeuristicEpisodes.txt b/.besouro/20161007143530388/randomHeuristicEpisodes.txt index 0bb3269..19eed9b 100644 --- a/.besouro/20161007143530388/randomHeuristicEpisodes.txt +++ b/.besouro/20161007143530388/randomHeuristicEpisodes.txt @@ -13,3 +13,4 @@ 1475847720726 test-first 4 55 true 1475847882303 refactoring 2A 126 false 1475848041021 refactoring 2A 19 true +1475848501574 test-last 1 45 false diff --git a/.besouro/20161007143530388/zorroEpisodes.txt b/.besouro/20161007143530388/zorroEpisodes.txt index f954400..0da220d 100644 --- a/.besouro/20161007143530388/zorroEpisodes.txt +++ b/.besouro/20161007143530388/zorroEpisodes.txt @@ -13,3 +13,4 @@ 1475847720726 test-first 4 171 true 1475847882303 refactoring 2A 161 true 1475848041021 refactoring 2A 158 true +1475848501574 test-last 1 460 false diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index fbd7770ead8f07c0d13cb3cb9698dc3c8430ad43..b03695407a479ca5406f7a86a58e630b4ee03dee 100644 GIT binary patch delta 170 zcmbQne?oxk)W2Q(7#J8#7z#FW=`vfem82Gz7#eUeq%txv`I~Vtq%$%w+Xes`nLq&$ zoedHI$>cIJa4I`z7A2SFBo<9JWj1Hz-ki&_7! delta 36 scmX>hFpZz<)W2Q(7#J8#7*aQK=`v3)WHx2w+Ps`ug@u)Yfr%jn0NRWRg8%>k From 17d245d46f599de448d9c15c2b4fb4ff963532ab Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:58:36 +0300 Subject: [PATCH 48/50] besouro automatic message From 7c0827b2b8c96f4f71c406b5a2503e67cc60e007 Mon Sep 17 00:00:00 2001 From: atatlisu Date: Fri, 14 Oct 2016 17:03:07 +0300 Subject: [PATCH 49/50] Almost finished --- .besouro/20161014142533738/actions.txt | 0 .besouro/20161014142533738/zorroEpisodes.txt | 0 .besouro/2016101414261064/actions.txt | 0 .besouro/2016101414261064/zorroEpisodes.txt | 0 bin/.gitignore | 1 + bin/Spreadsheet.class | Bin 2892 -> 3888 bytes bin/SpreadsheetTest.class | Bin 2120 -> 3153 bytes src/Spreadsheet.java | 137 ++++++++++++++++++- tests/SpreadsheetTest.java | 37 ++++- 9 files changed, 169 insertions(+), 6 deletions(-) create mode 100644 .besouro/20161014142533738/actions.txt create mode 100644 .besouro/20161014142533738/zorroEpisodes.txt create mode 100644 .besouro/2016101414261064/actions.txt create mode 100644 .besouro/2016101414261064/zorroEpisodes.txt diff --git a/.besouro/20161014142533738/actions.txt b/.besouro/20161014142533738/actions.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161014142533738/zorroEpisodes.txt b/.besouro/20161014142533738/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2016101414261064/actions.txt b/.besouro/2016101414261064/actions.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2016101414261064/zorroEpisodes.txt b/.besouro/2016101414261064/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/bin/.gitignore b/bin/.gitignore index 2079672..1238de0 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,2 +1,3 @@ /Spreadsheet.class /SpreadsheetTest.class +/Spreadsheet$1.class diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 4fc2f3e1655f257e817b67cfcadc32e582134dcc..1e44009bac6a3906486da94923b6ec1c858154ac 100644 GIT binary patch literal 3888 zcmZ`+Yi|_i6@K2icn4>|X0ZtYyKxK{UltrL22x)DJ2-JMm*87WfOxz+m?4|p&Frk3 zlr|wvO4B4HX;ad!+uWnls!~OzvY;YW{ZKVhKD8h6xmBWG{y!=BcJFar>$y=U>-7pO8FS`RmX~vFfsQbnzCh^*9rIi#HP<^pKiziS zv@0Nv2-NgBDaRWSP}@5u1+<}b!mfpiIurN6j9|IIijdK3QIEPM5NI%=qeh@^)JfR~ za!=3N?zlCZWJb}^blgf#TCO9%i%QKq>9C@uqh;kYBX!PZy>0E4`4;OcFF}soWTF{g zV;hrJ)*DGB>}L<2V579y0I<#YO`o6kT%ceI`b+pQOv?X0tw*D!N%5+`vKdYVBT0GU@r4iNhG9Dru+Y zWX7c0h=B>dd~qf(Ev8I7F6%PvRKl-HDv!tkpAcBtK61yL-5TW>Q|p(OPnwvKjjget z$yv#)fmtGL5=oe_L1Gy3bjq`w6sfnSe8z@OTJ9LV>{Q(Dl}%%IkdCKJJOxgD#3^x0 zBXdZlR-`2Lk`ZJC?!B8AgE=Reu>GoC6IqZU5q~}{txSep6WCZ@SBVA{(TfT8$`Ic%@jPB&bG&q5&(+*szB-CgBzIqwjqEb; z5(%(&$Z_Mjq{T7?zGq@1RvY*}Ti$8l2Nc}~UZYrV;2cG}fj22Sr11|;{0OVLt|Ygq zboe8|mZUSbYk5vOMf&>Myf5q1GnSj>ic+&4H@(`ibk2?2!;aje>dQPg$;lKjM^Y)<9pZ>tJBtUHwaRT< z;g9!CL~iTftWpgEJIj97f>) z!x{rMtiuL)}uS2l` zAA2(t+wEi7P;Ai0{LV_eeCDDL`&e(N->{F}ABsInEHB>E`Y(vnVFpbFe52Ud;i`Dh z+_tK?-(XQw6%U&H&#HLP=s#D*gJ%DtDjqcaY*jpH`iZJ|(D>o1c+mW|s<=-~)I<+l ztT35+SrJVYTCT+c4t@Al=7QP~21du_v|+p&Hkn6H7^a0OIg*wrVESTMe#|6#R1T)h zhxuwc9c4Dh^Fo9gkU#rlQLBJ>9&g0_#ADI90w$l&<8-XPtpG<$48%0<6^C@0#`2c? zsN1gHt$KR9-l%Ca%^x75U4W)GYcq{{>4U+#t|C1h)1(cfT){J!k&89z`izY17g)fv z1$kA?3julQK_j`Aw8JdRb%lVo_^w=iSTH~g2z zK(m0ll18qS*cH4LT2Q!>M~Uj6T-VSq&mlCS0XwM~=P{Gv@$x#4!e8Jkv)IO4{~@%93Et*&Xcgyqb-#pl;&ZGQ|3RD5hz&{)+LZ}(C^>X0=h3BHLQJ`W zP0D9zQT~n1Y6M%=wdheNuv2{;y{d;k^*s93-(Wz!j9u!d*scBrd(IZO4KZWD^Sv;wKgcq%%0)5Ta2?HyaFm<)6>1_75w!BZ5WFz# z7W>3a+TW>Ggy{M&6lD?nuY*s!X%Vm8KqtMHE7zel@It^_T=6C`z(XCk^Q#UnJ0?D0UGo0&q5u2{A5+Rp;sPcA{U7O7eZK$z literal 2892 zcmbVOOK;Rx7(Lf^GA1~$Ndf^9NC<>XLI{LBn+JuE&}k=xGI@~ng=fYj1~W6*o)lE6 z>Z0lbRq6r-HC}M?0bFB_c-6V z_kQxDXFvV~pa(ZY5EypGv!rI0qyy;s3LG>~+LYT40rO1n9Ag~TZg;3_v1 ziE{h>3U=cFw}=)-^lUn$zv2ZGk)rkp&qi$?JrS zUK+Y(^wV%s#vlznGDvdPD`SL)J{hNI=$CPth5;F4Gz`iZr=e5EIT|{6?x=#-@dh0< zE0?gG^HZdzmt4jqovW5{)6AIMb4tMlyh%%jmR{tH>8M3z#A))!N2}aoM!_tvOV-jU zrz*a9i6@+A*wq$&Y0sW#d5frxaLacTyvv0x)o$ce!{S^ex{=a|Wda&M@Y~POmYlSI2`nklah1}j*(?!d==9nA!qeq?dpU-92t&bjq=}ZD zaY2UKwqlnd8Cg=gWlT4dIYT9W45oq()KkeiJyE(saa&DZn^d#j%_@s$a%NJS(D~h~ zD!5+9c+qI45F+&)Mh{(B8bdS_AVZ=#U3Gfzq?I#d#citEH=wjXK*jt9s@73`-?6Tt zcZCy2B)<|=(!7?|6xRoJ*hOC?H0r&0QL+$dt*-rhRP(1Jk3G`mJQ^ROX^j8@JSZmw zqQQghavi*2>R^^H_Ns$9%5uDL=fY9yF&jGh`VBc9f-Sve-enhqF)KbUEwDJaaa7-K-@W) zC=JKficID{7Fa{k>O(Z;asI1k*?a7+9~i#Kw++)l*z_uT{V>UIkupiCJm%K?_z{!v zf|KlTKVPYY966h}{|B2AzleTpxLx6Cm*`OD@!l$KZAI7`i>;nFw+BefhZi=GBAdlL zt~s1b!3_NX**L|v4gD@YBGvKFTpyrg&+`ZBAT>K(5N+P(2k^O1XAb)yj#5C z{W>c)#+_>tLW~R7#<+3m*2KSIe0y*ViJ6?4bDr-x@A>9@+5SD``TG0QX81vef4Z~2dAmAD|;zn#xK}|rUxRy1p7X_TGWel4o6Wp~H&<;VtzcQ8EiFbEd~Q2BRLt@zRS|crD;H>-AEtF;QI{Fz4z5{gM2Pxnw5h z%t|>id3mNZ-5C9!L<`ouV_0a`2S-|Uq8)B@!fE|-6x9xNz>6?^mhKE#)9pFcPoj}@ zN%D;(NV1b8L{e0HxC-;xE$i=`IaMdwL$X&Aw=1XaBiT>VC&>aygd|E5ljMi1;2R)0 zfFKg+$3bh%J?l%7q)5^vL)N-`ws(Z&5XmUX7`p;{6?{j~g&q6~RIIA2*B{d6HxQ1k zqf-lQAgxs`;S8#Wx%&vu%(TuF^_J;1w1#aO)_YfvdX&-xrDIZBl5tt>sx4((ao1&B zmS&D-UYa*$+?009Hm79VB&8FSPD<&HjB9FlZK>IcyD#HT(>z17AkBv|Zbf@+n=3Nz z9HsM=E=cJqrNG%d9P$#n<^MLdXZDuO@Q--0#;a+ApYLsSfs0JJgk30Zxx(&$SNKNS GZ~p)(60mFl delta 231 zcmW;HI}QO+7{&1qGw$4(Tm&OSJQ4&!;*l979vhfmEgHonSb;T2Zp|LF3bjy4Y`_wf z8gbn6{PJ(k!?`BR+xL7SBA2!&a}|+C%?nxbsd=1{Mx5frWKv&nK^Da*PjUHXw%qGJ zPeIZUTgeCFK(dgWl4aEA1xOK6QgVlsAr(kfiOYOmgVZ4nB?m|o(t@-hf#_g$DMLL} hefctMxijX%gASlW=m;8!F=PUnLT3Mtt??^Nn;)LZE@A)x diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 52b4664..3f3214c 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,9 +1,8 @@ import java.util.ArrayList; - public class Spreadsheet { ArrayList cells=new ArrayList(); - + static boolean error; public String get(String cell) { return cells.get(cells.lastIndexOf(cell)+1); // 1 @@ -59,7 +58,24 @@ public String evaluate(String cell) { }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("=")){ // starts with equation if(cells.get(cells.lastIndexOf(cell)+1).substring(1,2).equals("’")){ // starts with equation end quote - if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ // 6 + String operation = cells.get(cells.lastIndexOf(cell)+1).substring(1); + if(operation.contains("&")){ + if(operation.startsWith("’") & operation.endsWith("")){ + int index = operation.indexOf('&')-1; + int firstIndex =operation.substring(1, operation.length()-2).indexOf('’'); + int lastIndex = operation.substring(1, operation.length()-2).lastIndexOf('’'); + // System.out.println(operation.substring(1,firstIndex+1) + operation.substring(lastIndex+2,operation.length()-1)); + // System.out.println(firstIndex +" "+index+" "+lastIndex); + if((firstIndex +1 == index) & (index +1==lastIndex)){ + return operation.substring(1,firstIndex+1) + operation.substring(lastIndex+2,operation.length()-1); + }else{ + return "#Error"; + } + }else{ + return "#Error"; + } + + }else if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ // 6 return cells.get(cells.lastIndexOf(cell)+1).substring(2,cells.get(cells.lastIndexOf(cell)+1).length()-1); }else{ return "#Error"; // 7 @@ -72,11 +88,124 @@ public String evaluate(String cell) { } + }else if(cells.get(cells.lastIndexOf(cell)+1).contains("+")|| + cells.get(cells.lastIndexOf(cell)+1).contains("-")|| + cells.get(cells.lastIndexOf(cell)+1).contains("*")|| + cells.get(cells.lastIndexOf(cell)+1).contains("/")|| + cells.get(cells.lastIndexOf(cell)+1).contains("%")){ + String operation = cells.get(cells.lastIndexOf(cell)+1).substring(1); + /* for(int i=0 ; i= '0' && ch <= '9') || ch == '.') { // numbers + while ((ch >= '0' && ch <= '9') || ch == '.') nextChar(); + x = Integer.parseInt(str.substring(startPos, this.pos)); + + } else { + error = true; + throw new RuntimeException("Unexpected: " + (char)ch); + } + + return x; + } + + }.parse(); + } } diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 181e3bf..16176c4 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -1,9 +1,7 @@ import static org.junit.Assert.*; - import org.junit.Test; - public class SpreadsheetTest { Spreadsheet test = new Spreadsheet(); @@ -60,6 +58,41 @@ public void test10() { test.set("P6", "=O6"); assertTrue(test.evaluate("P6").equals("#Circular")); } + @Test + public void test11() { + test.set("A1", "=1+1*2"); + assertTrue(test.evaluate("A1").equals("4")); + } + @Test + public void test12(){ + test.set("A2", "=1+A1"); + assertTrue(test.evaluate("A2").equals("#Error")); + } + @Test + public void test13(){ + test.set("A5", "=’a’&’String’"); + assertTrue(test.evaluate("A5").equals("aString")); + } + @Test + public void test14(){ + test.set("A6", "=’a&’String’"); + assertTrue(test.evaluate("A6").equals("#Error")); + } + @Test + public void test15(){ + test.set("A9", "=1+(1*2)"); + assertTrue(test.evaluate("A9").equals("3")); + } + @Test + public void test16(){ + test.set("G1", "=1+(1*2"); + assertTrue(test.evaluate("G1").equals("#Error")); + } + @Test + public void test17(){ + test.set("A9", "=1 + ( 1 * 2)"); + assertEquals(test.evaluate("A9"),"3"); + } } \ No newline at end of file From 7f10385607d41c101ee8a694774481414996c9db Mon Sep 17 00:00:00 2001 From: ozan Date: Mon, 17 Oct 2016 01:27:43 +0300 Subject: [PATCH 50/50] problem at #12 resolved and project finished --- src/Spreadsheet.java | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 3f3214c..fa5b913 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -46,9 +46,9 @@ public String evaluate(String cell) { cells.get(cells.lastIndexOf(cell)+1); // 2 number } } - }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("’")){ // starts with quote + }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("�")){ // starts with quote - if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ // 4 ends with quote + if(cells.get(cells.lastIndexOf(cell)+1).endsWith("�")){ // 4 ends with quote return cells.get(cells.lastIndexOf(cell)+1).substring(1,cells.get(cells.lastIndexOf(cell)+1).length()-1); @@ -57,13 +57,13 @@ public String evaluate(String cell) { } }else if(cells.get(cells.lastIndexOf(cell)+1).startsWith("=")){ // starts with equation - if(cells.get(cells.lastIndexOf(cell)+1).substring(1,2).equals("’")){ // starts with equation end quote + if(cells.get(cells.lastIndexOf(cell)+1).substring(1,2).equals("�")){ // starts with equation end quote String operation = cells.get(cells.lastIndexOf(cell)+1).substring(1); if(operation.contains("&")){ - if(operation.startsWith("’") & operation.endsWith("")){ + if(operation.startsWith("�") & operation.endsWith("")){ int index = operation.indexOf('&')-1; - int firstIndex =operation.substring(1, operation.length()-2).indexOf('’'); - int lastIndex = operation.substring(1, operation.length()-2).lastIndexOf('’'); + int firstIndex =operation.substring(1, operation.length()-2).indexOf('�'); + int lastIndex = operation.substring(1, operation.length()-2).lastIndexOf('�'); // System.out.println(operation.substring(1,firstIndex+1) + operation.substring(lastIndex+2,operation.length()-1)); // System.out.println(firstIndex +" "+index+" "+lastIndex); if((firstIndex +1 == index) & (index +1==lastIndex)){ @@ -75,7 +75,7 @@ public String evaluate(String cell) { return "#Error"; } - }else if(cells.get(cells.lastIndexOf(cell)+1).endsWith("’")){ // 6 + }else if(cells.get(cells.lastIndexOf(cell)+1).endsWith("�")){ // 6 return cells.get(cells.lastIndexOf(cell)+1).substring(2,cells.get(cells.lastIndexOf(cell)+1).length()-1); }else{ return "#Error"; // 7 @@ -94,35 +94,17 @@ public String evaluate(String cell) { cells.get(cells.lastIndexOf(cell)+1).contains("/")|| cells.get(cells.lastIndexOf(cell)+1).contains("%")){ String operation = cells.get(cells.lastIndexOf(cell)+1).substring(1); - /* for(int i=0 ; i= 'A'&& ch<= 'Z')||(ch>='a' && ch<='z') ){ return "#Error"; } } - */ + if((operation.contains("(")&& !operation.contains(")"))||(!operation.contains("(") && operation.contains(")"))){ return "#Error";