From 8823db50a37ff15b4c9ed2209f48c5e8e08ebf73 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:19:51 +0300 Subject: [PATCH 01/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 12 ++++++++++++ .besouro/20161007161542914/besouroEpisodes.txt | 0 .besouro/20161007161542914/disagreements.txt | 0 .../20161007161542914/randomHeuristicEpisodes.txt | 0 .besouro/20161007161542914/userComments.txt | 0 .besouro/20161007161542914/zorroEpisodes.txt | 0 bin/.gitignore | 2 ++ tests/SpreadsheetTest.java | 5 +++-- 8 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .besouro/20161007161542914/actions.txt create mode 100644 .besouro/20161007161542914/besouroEpisodes.txt create mode 100644 .besouro/20161007161542914/disagreements.txt create mode 100644 .besouro/20161007161542914/randomHeuristicEpisodes.txt create mode 100644 .besouro/20161007161542914/userComments.txt create mode 100644 .besouro/20161007161542914/zorroEpisodes.txt create mode 100644 bin/.gitignore diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt new file mode 100644 index 0000000..0d58bd0 --- /dev/null +++ b/.besouro/20161007161542914/actions.txt @@ -0,0 +1,12 @@ +FileOpenedAction 1475846143101 Spreadsheet.java 264 3 2 0 +UnitTestCaseAction 1475846188251 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846188251 tests FAIL +FileOpenedAction 1475846201261 SpreadsheetTest.java 162 1 1 0 +RefactoringAction 1475846277951 SpreadsheetTest.java RENAME test()=>void test_() METHOD +RefactoringAction 1475846282069 SpreadsheetTest.java RENAME test_()=>void test_set() METHOD +RefactoringAction 1475846285158 SpreadsheetTest.java RENAME test_set()=>void test_setCellTovalue() METHOD +RefactoringAction 1475846289277 SpreadsheetTest.java RENAME test_setCellTovalue()=>void test_setCellToValue() METHOD +RefactoringAction 1475846316561 SpreadsheetTest.java RENAME test_setCellToValue()=>void test_setCellToValueA1() METHOD +RefactoringAction 1475846317591 SpreadsheetTest.java RENAME test_setCellToValueA1()=>void test_setCellToValueA1_V() METHOD +RefactoringAction 1475846318620 SpreadsheetTest.java RENAME test_setCellToValueA1_V()=>void test_setCellToValueA1_1() METHOD +EditAction 1475846391004 SpreadsheetTest.java 194 1 1 0 diff --git a/.besouro/20161007161542914/besouroEpisodes.txt b/.besouro/20161007161542914/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007161542914/disagreements.txt b/.besouro/20161007161542914/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007161542914/randomHeuristicEpisodes.txt b/.besouro/20161007161542914/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007161542914/userComments.txt b/.besouro/20161007161542914/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007161542914/zorroEpisodes.txt b/.besouro/20161007161542914/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/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 9e0936a..58acab0 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -7,8 +7,9 @@ public class SpreadsheetTest { @Test - public void test() { - fail("Not yet implemented"); + public void test_setCellToValueA1_1() { + SpreadSheet sheet = new SpreadSheet(); + } From c3a5405bd4d2710abc977697a6826470b542c89c Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:22:12 +0300 Subject: [PATCH 02/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 2 ++ bin/SpreadsheetTest.class | Bin 490 -> 600 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 0d58bd0..ee2b595 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -10,3 +10,5 @@ RefactoringAction 1475846316561 SpreadsheetTest.java RENAME test_setCellToValue( RefactoringAction 1475846317591 SpreadsheetTest.java RENAME test_setCellToValueA1()=>void test_setCellToValueA1_V() METHOD RefactoringAction 1475846318620 SpreadsheetTest.java RENAME test_setCellToValueA1_V()=>void test_setCellToValueA1_1() METHOD EditAction 1475846391004 SpreadsheetTest.java 194 1 1 0 +CompilationAction 1475846392954 SpreadsheetTest.java +EditAction 1475846531919 SpreadsheetTest.java 194 1 1 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index e7086bd9ef1b6a8b7afcfb717afbaddbf99a7876..f6486498837024a59918981bd0a161310d3ec62b 100644 GIT binary patch delta 269 zcmaFGe1nDS)W2Q(7#J8#7^Eh0^-GACq!yRN7pImur{?5@dker`ekeQQMl9`{UP*9Yg zl#`lUY^A`(8C+15nwS!tk(yefkery8mtUfgl&S#NR+6ufs8CW_kcv~K49o_EQZ5ET z1~DE6RtE9Oyo?KMnHd;?KH=KUAQ&kmyq!UGKaj`7zy&1Pz%twn+(0%DL=}+c1@agf IB*3a90m>vtoB#j- delta 158 zcmcb?@`{=3)W2Q(7#J8#7^Ek1^|P{+q!yP<+^Fxs!63xQAncc4qEMMyqL7(ekdvC5 znpcvV!o?uMAjZxh%E%y)UzDz&RhpMsqVHH-oLW@E!ywKe!N|apmYA6{xtei-Eh7UX w&}cRx!5s|38-Xk)1}-4U1*91mxEWX(c!4AX0}n(Mkmd#Q7#SpiBol)a0J6p&KmY&$ diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 58acab0..d490b6d 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -8,7 +8,7 @@ public class SpreadsheetTest { @Test public void test_setCellToValueA1_1() { - SpreadSheet sheet = new SpreadSheet(); + Spreadsheet sheet = new Spreadsheet(); } From 2c54c0e26cc37d40260f4bc18c93bb74bcafff39 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:22:31 +0300 Subject: [PATCH 03/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 600 -> 480 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index ee2b595..bf1d104 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -12,3 +12,4 @@ RefactoringAction 1475846318620 SpreadsheetTest.java RENAME test_setCellToValueA EditAction 1475846391004 SpreadsheetTest.java 194 1 1 0 CompilationAction 1475846392954 SpreadsheetTest.java EditAction 1475846531919 SpreadsheetTest.java 194 1 1 0 +EditAction 1475846550998 SpreadsheetTest.java 215 1 2 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f6486498837024a59918981bd0a161310d3ec62b..d27806e474be707b29ddaf55642ff71306d83536 100644 GIT binary patch delta 141 zcmcb?@_?D^)W2Q(7#J8#7$hcg-PYs|E+|S(OexMtO)cSK5M9ZFz^C-91M&M PA`GHHk`X8a(jyK4%w8DW delta 262 zcmaFBe1nDS)W2Q(7#J8#7^Eh0-LB`)N-Rs%&q>Tn*LN){$}i$z5Mg8}3(YG^EzZv= zOHENo&d)8#%tFt tfnMO+%^(;lB)pwLbU%>C#J~k4*}yW~4BS9A4@4D^<^}Q?86?1}BmuGVMHc`7 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index d490b6d..b423cd7 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -9,7 +9,7 @@ public class SpreadsheetTest { @Test public void test_setCellToValueA1_1() { Spreadsheet sheet = new Spreadsheet(); - + sheet.set("A1", "1"); } From 9c1d1e3b422e2b96582e732fd4bcff5db1bd8545 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:22:35 +0300 Subject: [PATCH 04/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 480 -> 565 bytes tests/SpreadsheetTest.java | 3 +-- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index bf1d104..9888175 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -13,3 +13,4 @@ EditAction 1475846391004 SpreadsheetTest.java 194 1 1 0 CompilationAction 1475846392954 SpreadsheetTest.java EditAction 1475846531919 SpreadsheetTest.java 194 1 1 0 EditAction 1475846550998 SpreadsheetTest.java 215 1 2 0 +EditAction 1475846554664 SpreadsheetTest.java 214 1 2 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index d27806e474be707b29ddaf55642ff71306d83536..c1ecef4ed83486132f7ad9d9002117fbd2aa4597 100644 GIT binary patch delta 184 zcmaFByp@IP)W2Q(7#J8#7!)RQz47E=5M^Xwax~;%5NBjyG~{9sWRT=xkYbQ#WMD2% zEn#F(*YL?oEKAhSNz6;v4=yRn%uBb%6wwTu_-$TnD%KA;i?25trp1|9|hAdef!6N6|1itqw?91NTcG7Pc|K<6;X0r^Y} F@&L~aAP4{e delta 99 zcmdnW@_?D^)W2Q(7#J8#7$hcgy_sy!IM2tCfe8p17&vz`2u5ya5cb&!PyFfxcRhyqDQpbSWlH~`dR43Yo< diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index b423cd7..410ac40 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -9,8 +9,7 @@ public class SpreadsheetTest { @Test public void test_setCellToValueA1_1() { Spreadsheet sheet = new Spreadsheet(); - sheet.set("A1", "1"); - + sheet.set("A1", "1"); } } From 48b5d96e7335b5659e11a268fea25a03db2b0542 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:23:10 +0300 Subject: [PATCH 05/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 565 -> 565 bytes tests/SpreadsheetTest.java | 3 ++- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 9888175..009c4a8 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -14,3 +14,4 @@ CompilationAction 1475846392954 SpreadsheetTest.java EditAction 1475846531919 SpreadsheetTest.java 194 1 1 0 EditAction 1475846550998 SpreadsheetTest.java 215 1 2 0 EditAction 1475846554664 SpreadsheetTest.java 214 1 2 0 +EditAction 1475846589328 SpreadsheetTest.java 248 1 3 1 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index c1ecef4ed83486132f7ad9d9002117fbd2aa4597..7c7ed92a44128f81ee82f848a6641428a8bc1369 100644 GIT binary patch delta 13 UcmdnWvXx~69}^?*WPT Date: Fri, 7 Oct 2016 16:25:24 +0300 Subject: [PATCH 06/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 5 +++++ bin/SpreadsheetTest.class | Bin 565 -> 796 bytes src/Spreadsheet.java | 2 ++ 3 files changed, 7 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 009c4a8..ba009b8 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -15,3 +15,8 @@ EditAction 1475846531919 SpreadsheetTest.java 194 1 1 0 EditAction 1475846550998 SpreadsheetTest.java 215 1 2 0 EditAction 1475846554664 SpreadsheetTest.java 214 1 2 0 EditAction 1475846589328 SpreadsheetTest.java 248 1 3 1 +UnitTestCaseAction 1475846594403 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846594403 SpreadsheetTest.java FAIL +RefactoringAction 1475846708440 Spreadsheet.java ADD Map sheet FIELD +RefactoringAction 1475846709953 Spreadsheet.java RENAME sheet=>Map sheetmap FIELD +EditAction 1475846723488 Spreadsheet.java 333 3 2 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 7c7ed92a44128f81ee82f848a6641428a8bc1369..f6aa1ad016331176acfc9bc28b25b4242d1a35c9 100644 GIT binary patch delta 342 zcmZXQKTE@45XPTNgDJ16G*NA?J;C$)-N8RwDBxhn#xC{=-c$=s@9adJ&m8Ua$iEmJY!H2d!;9S39 zdC+rLTyKh1bA~mpr`VpMJz<9d!P$k$c@cHkXrjSySz-db`4mgnKDimWttb^%fQUQ1QZk8%^(=Lok7?~TS!DmY#W2b zMxY=Q0~e6w11e!);AY@p;9(G8;03Z67{nl&fFis=9tQ&_gA9W#10xX10r^Y}@&Ifu B4N?FA diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e4f120b..fb393bc 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,6 +1,8 @@ public class Spreadsheet { + private Map sheetmap = new Map(); + public String get(String cell) { // to be implemented return null; From 4f0409a6cfef8185c0b4c319d62fd629fc604291 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:28:28 +0300 Subject: [PATCH 07/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 8 ++++++++ bin/Spreadsheet.class | Bin 613 -> 791 bytes src/Spreadsheet.java | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index ba009b8..f299322 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -20,3 +20,11 @@ UnitTestSessionAction 1475846594403 SpreadsheetTest.java FAIL RefactoringAction 1475846708440 Spreadsheet.java ADD Map sheet FIELD RefactoringAction 1475846709953 Spreadsheet.java RENAME sheet=>Map sheetmap FIELD EditAction 1475846723488 Spreadsheet.java 333 3 2 0 +CompilationAction 1475846725860 Spreadsheet.java +RefactoringAction 1475846735641 Spreadsheet.java ADD import java.util.Map IMPORT +CompilationAction 1475846747590 Spreadsheet.java +CompilationAction 1475846747746 Spreadsheet.java +CompilationAction 1475846825204 Spreadsheet.java +CompilationAction 1475846825263 Spreadsheet.java +CompilationAction 1475846838659 Spreadsheet.java +EditAction 1475846907300 Spreadsheet.java 395 3 3 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 92b411f05752a6cee6d06c9769e1b70d40aa0840..913935ff875b4fd394096f36fd1f35718fd54bf1 100644 GIT binary patch literal 791 zcma)3%Syvg5IvK$_We}r`?b-w3%e0P6a@uwQFT!fT;8^q_DW1kn)JJLAq53Lz>gB= zCczdW=pyqtGjrz5&F9zK2Y>_YBw!FSt)U}Dchr~CO&~@nK8mquSiiBbPr437z^mg?EU^&Ck!igug?kk8q29cA~9qsS@q%$+D(xu*oP zTDvF2E(TqhhKXDjDWnr95K58#Y2=Yhfl$sOjyXc1scd=UJ+-BCC)yTkDmMomVciQy z={y8uZeNWEx#r9Zum-ay`Q+VdRADU&vBr+HEWKg+Y~hJaHPTdjzfeWH^}X@2usoKV zlsXVDhw0Y9b2{=;=`)HmO850X?C{wp|4o9SZ)cz2%s>(`j`_{lW*9l=E@EG-Pmry@ zBmXc#@fD>Pzk8l--sdrSE{+1n3yfuh87!j08DR;_A>Sc;L(kH)w$KcEJ9wv_tOV6? zQg^IimFt8xth3dc&iM1SPelY2d7olCDE?4TNTG#nFqy%A^B;oBe+b%Q83wk$0i{Nh A0RR91 delta 316 zcmbQv_LPO|)W2Q(7#J8#7$hcgX-=FY!N@uB_OE&d1{MZJ237_(AjuAt)(6szK$=x+ zI|Ii?AcKj43rK>bL2Pay$pcXUq$4Pye*qC~ieA8eW; NrjuYU5(9fd902Cw5)}Xd diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index fb393bc..506a2c4 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,7 +1,8 @@ +import java.util.HashMap; public class Spreadsheet { - private Map sheetmap = new Map(); + private HashMap sheetmap = new HashMap(); public String get(String cell) { // to be implemented @@ -10,6 +11,7 @@ public String get(String cell) { public void set(String cell, String value) { // to be implemented + sheetmap.put(cell,value); } public String evaluate(String cell) { From 4c4702f9dae361fc8655e33077f427f33e9c7cd6 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:29:02 +0300 Subject: [PATCH 08/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/Spreadsheet.class | Bin 791 -> 880 bytes src/Spreadsheet.java | 3 +++ 3 files changed, 4 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index f299322..d37d93a 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -28,3 +28,4 @@ CompilationAction 1475846825204 Spreadsheet.java CompilationAction 1475846825263 Spreadsheet.java CompilationAction 1475846838659 Spreadsheet.java EditAction 1475846907300 Spreadsheet.java 395 3 3 0 +EditAction 1475846942197 Spreadsheet.java 423 3 4 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 913935ff875b4fd394096f36fd1f35718fd54bf1..2945de8cf4ad163f787646b51a3f85b656e8ff07 100644 GIT binary patch delta 200 zcmbQv_JNJ-)W2Q(7#J8#7*scM^)q^NG4L_S@i53UC@?ZG7nGJTGFWK%WF?j*>gOcp zrR)1AWu+#USYwK4VhT;3$@n42mw_1w85p>=wlD~4>uh6?4c`dlGBF4PNiHDG0JM;c zfuBJH$WnkPWe{Z$1M+~H7$g~_7#P7UMIeg_$X1$smPwgWc=AUkd3I%>3=@M20Ab}P AkN^Mx delta 110 zcmeysHl2;@)W2Q(7#J8#7!)^h^)pU>!uY|(9>`|~V#bX?f{8&GNU||70!cmw5g@4m tkz^2M5Cign$`~XWq`>lw46;BL6Ob)8xt&RwQE2jNCV6&wpc*Cy1pq4j4l)1$ diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 506a2c4..b6096f4 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -6,6 +6,9 @@ public class Spreadsheet { public String get(String cell) { // to be implemented + + sheetmap.get(cell); + return null; } From 41e225f56c2654e8427cc017c5b38692b6edc4ad Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:31:19 +0300 Subject: [PATCH 09/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 880 -> 944 bytes src/Spreadsheet.java | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index d37d93a..6edb71d 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -29,3 +29,6 @@ CompilationAction 1475846825263 Spreadsheet.java CompilationAction 1475846838659 Spreadsheet.java EditAction 1475846907300 Spreadsheet.java 395 3 3 0 EditAction 1475846942197 Spreadsheet.java 423 3 4 0 +UnitTestCaseAction 1475846960795 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846960811 SpreadsheetTest.java FAIL +EditAction 1475847078763 Spreadsheet.java 418 3 3 0 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 2945de8cf4ad163f787646b51a3f85b656e8ff07..7ac8d2591077b7b8daa16ddb85b2fa92bef1be1f 100644 GIT binary patch delta 242 zcmeyswt=1N)W2Q(7#J8#7&JC=IWzKcG4L@+@i2%pNHa31X-wYFs6N@B(T`1$he3%! zdGcb$w_eT+OhCxMz^%1~K~Q@egJd}41|XM-K^RDKfu*<@I2m{tM1XuTh*AboAPWSz z8Dtn_85n_3jzNC%Stbcbh476)ab(?sKvRUkx)m6h!FtejgUnF@n!^M%M|E;Lld`%P Rl5I?I+nC_Cse$cK2LO}s7tsI! delta 188 zcmdnM{(+6_)W2Q(7#J8#7*scMIWtafU<_cB<6)3zP?&s;@$KY%W+`P(1`(hFF$N|e z$;2QEWPtz^gCv6#10xVhGssNlWtMQ14c`bB7Y34CVAXs;njfrNfq@w)$_>}e4b=@2 ZQv{mB1T;r!avHO;x-bFTl)-kW007YZ5 Date: Fri, 7 Oct 2016 16:31:42 +0300 Subject: [PATCH 10/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 5 +++++ bin/Spreadsheet.class | Bin 944 -> 963 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 6edb71d..7480b1e 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -32,3 +32,8 @@ EditAction 1475846942197 Spreadsheet.java 423 3 4 0 UnitTestCaseAction 1475846960795 SpreadsheetTest.java FAIL UnitTestSessionAction 1475846960811 SpreadsheetTest.java FAIL EditAction 1475847078763 Spreadsheet.java 418 3 3 0 +UnitTestCaseAction 1475847083851 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847083851 SpreadsheetTest.java FAIL +RefactoringAction 1475847099685 SpreadsheetTest.java RENAME test_setCellToValueA1_1()=>void test_setCellToValueSA1_1() METHOD +RefactoringAction 1475847101230 SpreadsheetTest.java RENAME test_setCellToValueSA1_1()=>void test_setCellToValueStringA1_1() METHOD +EditAction 1475847102103 SpreadsheetTest.java 254 1 3 1 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 7ac8d2591077b7b8daa16ddb85b2fa92bef1be1f..60725021099cae7af254cf2e6d0b775087a4b2c7 100644 GIT binary patch delta 179 zcmdnMewdx>)W2Q(7#J8#7_>HWl`)F3GsrSB2xKLeCF Date: Fri, 7 Oct 2016 16:31:48 +0300 Subject: [PATCH 11/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 796 -> 802 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 7480b1e..0da4d88 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -37,3 +37,4 @@ UnitTestSessionAction 1475847083851 SpreadsheetTest.java FAIL RefactoringAction 1475847099685 SpreadsheetTest.java RENAME test_setCellToValueA1_1()=>void test_setCellToValueSA1_1() METHOD RefactoringAction 1475847101230 SpreadsheetTest.java RENAME test_setCellToValueSA1_1()=>void test_setCellToValueStringA1_1() METHOD EditAction 1475847102103 SpreadsheetTest.java 254 1 3 1 +EditAction 1475847107906 SpreadsheetTest.java 256 1 3 1 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index f6aa1ad016331176acfc9bc28b25b4242d1a35c9..eb883116601bc0a8092d9b9f561ac27f6dc67109 100644 GIT binary patch delta 37 scmbQkwuo)QOexut)Z&u(;?xr7)SR4<{IJBF($wIRqRhPXjcfCn01YM%oB#j- delta 31 mcmZ3)HivD(OcC*t)Z&u(;?xr7)SR4<{IJBF($tNc^O*p Date: Fri, 7 Oct 2016 16:34:08 +0300 Subject: [PATCH 12/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 9 +++++++++ bin/SpreadsheetTest.class | Bin 802 -> 732 bytes tests/SpreadsheetTest.java | 7 ++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 0da4d88..264ba9c 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -38,3 +38,12 @@ RefactoringAction 1475847099685 SpreadsheetTest.java RENAME test_setCellToValueA RefactoringAction 1475847101230 SpreadsheetTest.java RENAME test_setCellToValueSA1_1()=>void test_setCellToValueStringA1_1() METHOD EditAction 1475847102103 SpreadsheetTest.java 254 1 3 1 EditAction 1475847107906 SpreadsheetTest.java 256 1 3 1 +UnitTestCaseAction 1475847111747 SpreadsheetTest.java OK +UnitTestSessionAction 1475847111747 SpreadsheetTest.java OK +RefactoringAction 1475847224254 SpreadsheetTest.java ADD void test_a FIELD +RefactoringAction 1475847229402 SpreadsheetTest.java RENAME test_a=>void test_evaluateCellInteger FIELD +RefactoringAction 1475847232491 SpreadsheetTest.java RENAME test_evaluateCellInteger=>void test_evaluateCorrectCellInteger FIELD +RefactoringAction 1475847235580 SpreadsheetTest.java RENAME test_evaluateCorrectCellInteger=>void test_evaluateCorrectlyFormattedCellInteger FIELD +RefactoringAction 1475847236610 SpreadsheetTest.java RENAME test_evaluateCorrectlyFormattedCellInteger=>void test_evaluateCorrectlyFormattedCellInteger() METHOD +RefactoringAction 1475847246391 SpreadsheetTest.java ADD Spreadsheet sheet FIELD +EditAction 1475847247888 SpreadsheetTest.java 335 2 2 1 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index eb883116601bc0a8092d9b9f561ac27f6dc67109..5df95ef0651bfdba9880c2bef2d7ebd367f6d75f 100644 GIT binary patch delta 164 zcmZ3)c88Vg)W2Q(7#J8#7_>HW*)j?VGRX2U$T7$>GBBs7mM}7?X-qa`6rQ|+QAAFW zL7AOFiIG7dzbIWlt28gOMBlNvIJKyRhe3rwb@C&|>nbq}%nVFG(`0rt2u5ya5cbg) z5)l&H#vmai24rnxklDeYF!?@{l%_NT9|Jc~p%_Ft0}lf)kjKFw!l1^W&cFzS8bCf1 GgC+ocQ5`b? delta 241 zcmcb^x`>VI)W2Q(7#J8#7z{RY*)sabGRU(t$T2bqW+j#->gOcprR#g2S%s2*S1}2~z Date: Fri, 7 Oct 2016 16:34:21 +0300 Subject: [PATCH 13/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 2 ++ bin/SpreadsheetTest.class | Bin 732 -> 855 bytes tests/SpreadsheetTest.java | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 264ba9c..7f8a514 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -47,3 +47,5 @@ RefactoringAction 1475847235580 SpreadsheetTest.java RENAME test_evaluateCorrect RefactoringAction 1475847236610 SpreadsheetTest.java RENAME test_evaluateCorrectlyFormattedCellInteger=>void test_evaluateCorrectlyFormattedCellInteger() METHOD RefactoringAction 1475847246391 SpreadsheetTest.java ADD Spreadsheet sheet FIELD EditAction 1475847247888 SpreadsheetTest.java 335 2 2 1 +RefactoringAction 1475847255657 SpreadsheetTest.java RENAME sheet=>Spreadsheet test_sheet FIELD +EditAction 1475847260977 SpreadsheetTest.java 350 2 2 1 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 5df95ef0651bfdba9880c2bef2d7ebd367f6d75f..69bf93b3b28b2710252663d1e2ac60a199c0184f 100644 GIT binary patch delta 492 zcmZ9H-AV#c6ouCrb<~;TPnMNd_Fp{5d>X@KX1Bs97?`z-ce>)ZR&_n~U<-!E?fwvg*;xg(!_A%tWIRgSMMQLPPR zkwM*Vv>I}U!IRFMFnG&mO=$2y=kO!oM~FfHKRnK3xiJ33iwy-2e8X4!F6|;sEwmcIz)n>aY zMcK40aW0#;d!}_&l~UBoqS@SUNl_P;^Tl!N2ta~adMLfV z$XLt^Mze0QAV__9TXa~Wm>kN!<+1EgW+l0odU=hFH0y$U8()Oi4>wnxu-R@$amQhk zt>i-*fjJ5ma;<+ojih4K9>G8`NhzlFyHHt_&FTQFr-Om5IFwOCR?!(7lykZXGpZWQ zPF(KD2d7Nw6-sY-Cj;hMdw$*z`V{;?r#__@R(mx63Vf#3oW;^uSA&ZhJ1h&vA(JwT OJQcRJRM=6~VD}gJy)JM7 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 00abdd2..ef06faa 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -6,12 +6,12 @@ public class SpreadsheetTest { - private Spreadsheet sheet = new Spreadsheet(); + private Spreadsheet test_sheet = new Spreadsheet(); @Test public void test_setCellToValueStringA1_1() { - sheet.set("A1", "1"); - assertEquals("1", sheet.get("A1")); + test_sheet.set("A1", "1"); + assertEquals("1", test_sheet.get("A1")); } public void test_evaluateCorrectlyFormattedCellInteger() { From 3287a2c9c29c9d6942b0c3e26a2499a9e68b4d40 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:35:39 +0300 Subject: [PATCH 14/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 855 -> 860 bytes tests/SpreadsheetTest.java | 4 +++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 7f8a514..176b02c 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -49,3 +49,4 @@ RefactoringAction 1475847246391 SpreadsheetTest.java ADD Spreadsheet sheet FIELD EditAction 1475847247888 SpreadsheetTest.java 335 2 2 1 RefactoringAction 1475847255657 SpreadsheetTest.java RENAME sheet=>Spreadsheet test_sheet FIELD EditAction 1475847260977 SpreadsheetTest.java 350 2 2 1 +EditAction 1475847338728 SpreadsheetTest.java 451 2 5 2 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 69bf93b3b28b2710252663d1e2ac60a199c0184f..eb1c82a5828664b8c568f19d76793edee69c082c 100644 GIT binary patch delta 17 Ycmcc4c86_(IU83=YH>;YMhkgn067~4!2kdN delta 12 Tcmcb^cAag4IV0;vTX|*x9To$f diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index ef06faa..31bb1e7 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -15,7 +15,9 @@ public void test_setCellToValueStringA1_1() { } public void test_evaluateCorrectlyFormattedCellInteger() { - + test_sheet.set("A1", "1"); + String result = test_sheet.evaluate("A1"); + assertEquals("A1", result); } } From e20297681b0d60261d4520e29258b0eba4367ff7 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:36:31 +0300 Subject: [PATCH 15/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 860 -> 960 bytes tests/SpreadsheetTest.java | 1 + 3 files changed, 4 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 176b02c..e1c63b2 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -50,3 +50,6 @@ EditAction 1475847247888 SpreadsheetTest.java 335 2 2 1 RefactoringAction 1475847255657 SpreadsheetTest.java RENAME sheet=>Spreadsheet test_sheet FIELD EditAction 1475847260977 SpreadsheetTest.java 350 2 2 1 EditAction 1475847338728 SpreadsheetTest.java 451 2 5 2 +UnitTestCaseAction 1475847345689 SpreadsheetTest.java OK +UnitTestSessionAction 1475847345689 SpreadsheetTest.java OK +EditAction 1475847390898 SpreadsheetTest.java 458 2 5 2 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index eb1c82a5828664b8c568f19d76793edee69c082c..3cf760cf6667066eb63c4f6e7efd691ab6832f21 100644 GIT binary patch delta 179 zcmcb^c7UDh)W2Q(7#J8#7>qV@DKZ&zG4L?x@G$5yC^Ir}q?RS-lqQy>GBU6gr52aw zlrS;~`D7)QCFwm5o4oCI&$uDa616Cb=1e8AKUG7^E4*fMN_l5^M%gR0PNqWngE}W6)<{1VRHK IpNYW`06N4Tng9R* delta 78 zcmX@Weus_g)W2Q(7#J8#7<4ysDKbrtWBP5T4dgR|@J1lP#2^SH*}wuK3_?IQ4@8nd Pm_Y=jhykRWi9rVdY61!b diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 31bb1e7..9a56d15 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -14,6 +14,7 @@ public void test_setCellToValueStringA1_1() { assertEquals("1", test_sheet.get("A1")); } + @Test public void test_evaluateCorrectlyFormattedCellInteger() { test_sheet.set("A1", "1"); String result = test_sheet.evaluate("A1"); From 35faaf0d0ba35deb552debb45c866e950db27472 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:37:14 +0300 Subject: [PATCH 16/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 960 -> 972 bytes src/Spreadsheet.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index e1c63b2..05d8c9b 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -53,3 +53,6 @@ EditAction 1475847338728 SpreadsheetTest.java 451 2 5 2 UnitTestCaseAction 1475847345689 SpreadsheetTest.java OK UnitTestSessionAction 1475847345689 SpreadsheetTest.java OK EditAction 1475847390898 SpreadsheetTest.java 458 2 5 2 +UnitTestCaseAction 1475847394083 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847394083 SpreadsheetTest.java FAIL +EditAction 1475847433411 Spreadsheet.java 432 3 3 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 3cf760cf6667066eb63c4f6e7efd691ab6832f21..c891ca32f5d3ca55906478112fc226059655c36d 100644 GIT binary patch delta 43 xcmX@WeujNRFf%U`gBSw?0~-S)gE#}j;LFf$|LP@nAHGpf(6R} diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 5eec314..8f23537 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -19,7 +19,7 @@ public void set(String cell, String value) { public String evaluate(String cell) { // to be implemented - return null; + return sheetmap.get(cell); } } From 836d0ab0f034d1985c604b6d3de4ee7a252f543b Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:37:46 +0300 Subject: [PATCH 17/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/Spreadsheet.class | Bin 963 -> 973 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 05d8c9b..d876fc2 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -56,3 +56,6 @@ EditAction 1475847390898 SpreadsheetTest.java 458 2 5 2 UnitTestCaseAction 1475847394083 SpreadsheetTest.java FAIL UnitTestSessionAction 1475847394083 SpreadsheetTest.java FAIL EditAction 1475847433411 Spreadsheet.java 432 3 3 0 +UnitTestCaseAction 1475847439404 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847439404 SpreadsheetTest.java FAIL +EditAction 1475847465597 SpreadsheetTest.java 457 2 5 2 diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 60725021099cae7af254cf2e6d0b775087a4b2c7..d5dfcbd859cd161e85d0a106611d8f1586be5fe7 100644 GIT binary patch delta 27 jcmX@iewKYh6Z7PoOe&M-F!N02WENr9U|?WiV$cKtfExy} delta 73 zcmX@hewckj6SJck10w?y0|NsS;|37PAPgkgfMN^`Vhkc+5-iIg3gm+T6N4OsJW!sI JK?BUw1OOz{1t0(b diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 9a56d15..d369f63 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -18,7 +18,7 @@ public void test_setCellToValueStringA1_1() { public void test_evaluateCorrectlyFormattedCellInteger() { test_sheet.set("A1", "1"); String result = test_sheet.evaluate("A1"); - assertEquals("A1", result); + assertEquals("1", result); } } From 0347a46b248e1ac4c0a0fc3949fcd38b318d0b0f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:38:02 +0300 Subject: [PATCH 18/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 972 -> 972 bytes tests/SpreadsheetTest.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index d876fc2..718885e 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -59,3 +59,6 @@ EditAction 1475847433411 Spreadsheet.java 432 3 3 0 UnitTestCaseAction 1475847439404 SpreadsheetTest.java FAIL UnitTestSessionAction 1475847439404 SpreadsheetTest.java FAIL EditAction 1475847465597 SpreadsheetTest.java 457 2 5 2 +UnitTestCaseAction 1475847469391 SpreadsheetTest.java OK +UnitTestSessionAction 1475847469391 SpreadsheetTest.java OK +EditAction 1475847481621 SpreadsheetTest.java 465 2 5 2 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index c891ca32f5d3ca55906478112fc226059655c36d..06505d95402d722810492c9222e542e4ccd7bda5 100644 GIT binary patch delta 13 UcmX@ZeujNR3p1nCP03zH3TL1t6 delta 13 UcmX@ZeujNR3p1m{P03y-^SpWb4 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index d369f63..803b92d 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -15,7 +15,7 @@ public void test_setCellToValueStringA1_1() { } @Test - public void test_evaluateCorrectlyFormattedCellInteger() { + public void test_evaluateCorrectlyFormattedCellPositiveInteger() { test_sheet.set("A1", "1"); String result = test_sheet.evaluate("A1"); assertEquals("1", result); From 5d53fe442bd12c0b51e7ca035e621e0b86c6c99f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:38:16 +0300 Subject: [PATCH 19/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 2 ++ bin/SpreadsheetTest.class | Bin 972 -> 980 bytes tests/SpreadsheetTest.java | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 718885e..a9e454f 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -62,3 +62,5 @@ EditAction 1475847465597 SpreadsheetTest.java 457 2 5 2 UnitTestCaseAction 1475847469391 SpreadsheetTest.java OK UnitTestSessionAction 1475847469391 SpreadsheetTest.java OK EditAction 1475847481621 SpreadsheetTest.java 465 2 5 2 +RefactoringAction 1475847488828 SpreadsheetTest.java ADD void test_evaluateCorrectlyFormattedCellPositiveInteger()/2 METHOD +EditAction 1475847496020 SpreadsheetTest.java 651 3 8 3 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 06505d95402d722810492c9222e542e4ccd7bda5..2837dd7b0a2b539db3a7c1daa569dbbec385bd75 100644 GIT binary patch delta 26 hcmX@ZeuaGj6Qj{&MkZyBfc)ajlFYKy%_>YQ7y)f#2pRwY delta 17 Ycmcb@eujMk6QkB-MkeLWI!r4V0WfO>zW@LL diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 803b92d..f76c530 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -21,4 +21,12 @@ public void test_evaluateCorrectlyFormattedCellPositiveInteger() { assertEquals("1", result); } + + @Test + public void test_evaluateCorrectlyFormattedCellNegativeInteger() { + test_sheet.set("A1", "1"); + String result = test_sheet.evaluate("A1"); + assertEquals("1", result); + + } } From 2d2679d7d305bc11a846a0a7ce8e3cff8501027e Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:38:23 +0300 Subject: [PATCH 20/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 980 -> 1151 bytes tests/SpreadsheetTest.java | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index a9e454f..5ce3083 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -64,3 +64,4 @@ UnitTestSessionAction 1475847469391 SpreadsheetTest.java OK EditAction 1475847481621 SpreadsheetTest.java 465 2 5 2 RefactoringAction 1475847488828 SpreadsheetTest.java ADD void test_evaluateCorrectlyFormattedCellPositiveInteger()/2 METHOD EditAction 1475847496020 SpreadsheetTest.java 651 3 8 3 +EditAction 1475847502978 SpreadsheetTest.java 653 3 8 3 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 2837dd7b0a2b539db3a7c1daa569dbbec385bd75..d681e752dbf667669e219d1e035783e4febb8cdd 100644 GIT binary patch delta 79 zcmcb@{-1;E)W2Q(7#J8#7>qY^#W77{QsMVYO;0SzEKBvwD@jdHEt;IhWX{O4c^;D? izL))4T1WZ7>oei>=X0= delta 36 scmey*afO}h)W2Q(7#J8#7>qV@#W78u%Vf&Py!kSdAtNgT0~3QG0PDXB3jhEB diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index f76c530..15fe277 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -24,9 +24,9 @@ public void test_evaluateCorrectlyFormattedCellPositiveInteger() { @Test public void test_evaluateCorrectlyFormattedCellNegativeInteger() { - test_sheet.set("A1", "1"); + test_sheet.set("A1", "-1"); String result = test_sheet.evaluate("A1"); - assertEquals("1", result); + assertEquals("-1", result); } } From d03f09c044a8b4c3e205ebe5b4f5d8ed646d218f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:38:45 +0300 Subject: [PATCH 21/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 1151 -> 1159 bytes tests/SpreadsheetTest.java | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 5ce3083..976323c 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -65,3 +65,6 @@ EditAction 1475847481621 SpreadsheetTest.java 465 2 5 2 RefactoringAction 1475847488828 SpreadsheetTest.java ADD void test_evaluateCorrectlyFormattedCellPositiveInteger()/2 METHOD EditAction 1475847496020 SpreadsheetTest.java 651 3 8 3 EditAction 1475847502978 SpreadsheetTest.java 653 3 8 3 +UnitTestCaseAction 1475847507614 SpreadsheetTest.java OK +UnitTestSessionAction 1475847507614 SpreadsheetTest.java OK +EditAction 1475847524431 SpreadsheetTest.java 655 3 8 3 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index d681e752dbf667669e219d1e035783e4febb8cdd..16ed17bfdb71d41a2ee2691d8e009129575305e4 100644 GIT binary patch delta 62 zcmey*(ayff$?3=9k=45k~oCNgnwFc>j1FzFg@p3T(DC}6maK}Kr}1HX{OHU@1U RA;ZZQEDr3(K;=vfCIA?O4l@7% delta 40 vcmZqY{LjI4>ff$?3=9k=48|L|CNgba%+$*`c^9+F Date: Fri, 7 Oct 2016 16:39:56 +0300 Subject: [PATCH 22/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + src/Spreadsheet.java | 1 + 2 files changed, 2 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 976323c..7147448 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -68,3 +68,4 @@ EditAction 1475847502978 SpreadsheetTest.java 653 3 8 3 UnitTestCaseAction 1475847507614 SpreadsheetTest.java OK UnitTestSessionAction 1475847507614 SpreadsheetTest.java OK EditAction 1475847524431 SpreadsheetTest.java 655 3 8 3 +EditAction 1475847595723 Spreadsheet.java 433 3 3 0 diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 8f23537..e5cc748 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -21,5 +21,6 @@ public String evaluate(String cell) { // to be implemented return sheetmap.get(cell); } + } From 3049ba369d59bbba2a92c42eee0ef64259f07a79 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:40:02 +0300 Subject: [PATCH 23/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + tests/SpreadsheetTest.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 7147448..7e7b2ba 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -69,3 +69,4 @@ UnitTestCaseAction 1475847507614 SpreadsheetTest.java OK UnitTestSessionAction 1475847507614 SpreadsheetTest.java OK EditAction 1475847524431 SpreadsheetTest.java 655 3 8 3 EditAction 1475847595723 Spreadsheet.java 433 3 3 0 +EditAction 1475847601854 SpreadsheetTest.java 654 3 8 3 diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 98ea08b..260a2fa 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -26,7 +26,6 @@ public void test_evaluateCorrectlyFormattedCellPositiveInteger() { public void test_evaluateCorrectlyFormattedCellNegativeInteger() { test_sheet.set("A1", "-1"); String result = test_sheet.evaluate("A1"); - assertEquals("-1", result); - + assertEquals("-1", result); } } From 8a882a35c6e1f3f94cf7b5083aa6a30d976a46a9 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:40:23 +0300 Subject: [PATCH 24/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 4 ++++ bin/SpreadsheetTest.class | Bin 1159 -> 1159 bytes tests/SpreadsheetTest.java | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 7e7b2ba..12ab54a 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -70,3 +70,7 @@ UnitTestSessionAction 1475847507614 SpreadsheetTest.java OK EditAction 1475847524431 SpreadsheetTest.java 655 3 8 3 EditAction 1475847595723 Spreadsheet.java 433 3 3 0 EditAction 1475847601854 SpreadsheetTest.java 654 3 8 3 +RefactoringAction 1475847610309 SpreadsheetTest.java ADD void test_evaluateCorrectlyFormattedCellNegativeInteger()/2 METHOD +RefactoringAction 1475847617001 SpreadsheetTest.java RENAME test_evaluateCorrectlyFormattedCellNegativeInteger()/2=>void test_evaluateInvalidFormattedCellNegativeInteger() METHOD +RefactoringAction 1475847621634 SpreadsheetTest.java RENAME test_evaluateInvalidFormattedCellNegativeInteger()=>void test_evaluateInvalidFormattedCellInteger() METHOD +EditAction 1475847622773 SpreadsheetTest.java 831 4 11 4 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index 16ed17bfdb71d41a2ee2691d8e009129575305e4..c91d7e6e84aa4064e5c38cad98893246ad40ebe3 100644 GIT binary patch delta 13 UcmZqYZ0FpNz``guIgv#T02=@UasU7T delta 13 UcmZqYZ0FpNz``g$Igv#T02>7Za{vGU diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 260a2fa..6ec874d 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -28,4 +28,11 @@ public void test_evaluateCorrectlyFormattedCellNegativeInteger() { String result = test_sheet.evaluate("A1"); assertEquals("-1", result); } + + @Test + public void test_evaluateInvalidFormattedCellInteger() { + test_sheet.set("A1", "-1"); + String result = test_sheet.evaluate("A1"); + assertEquals("-1", result); + } } From 1130be74d6673e4566e9b2d88ee7311d1984ab4f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:40:51 +0300 Subject: [PATCH 25/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 1 + bin/SpreadsheetTest.class | Bin 1159 -> 1320 bytes tests/SpreadsheetTest.java | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 12ab54a..679c12b 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -74,3 +74,4 @@ RefactoringAction 1475847610309 SpreadsheetTest.java ADD void test_evaluateCorre RefactoringAction 1475847617001 SpreadsheetTest.java RENAME test_evaluateCorrectlyFormattedCellNegativeInteger()/2=>void test_evaluateInvalidFormattedCellNegativeInteger() METHOD RefactoringAction 1475847621634 SpreadsheetTest.java RENAME test_evaluateInvalidFormattedCellNegativeInteger()=>void test_evaluateInvalidFormattedCellInteger() METHOD EditAction 1475847622773 SpreadsheetTest.java 831 4 11 4 +EditAction 1475847650494 SpreadsheetTest.java 835 4 11 4 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index c91d7e6e84aa4064e5c38cad98893246ad40ebe3..dd6b79c8b076f82873984e6af82dad1553254490 100644 GIT binary patch delta 106 zcmZqYT*1Y4>ff$?3=9k=3}zd-W;1DOl%y7y#HW@e=9DIuq8VAN7c-eNvTnZ3w48CW0kg0O6$WVr)yau0^6Vx+ IqnQ{?0hk{iq5uE@ delta 36 scmZ3%)y~Ov>ff$?3=9k=45k~oW;0E`z+}qEvYCx}IU_3r0~3P@0NIcUi~s-t diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 6ec874d..40a153b 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -31,8 +31,8 @@ public void test_evaluateCorrectlyFormattedCellNegativeInteger() { @Test public void test_evaluateInvalidFormattedCellInteger() { - test_sheet.set("A1", "-1"); + test_sheet.set("A1", "A3"); String result = test_sheet.evaluate("A1"); - assertEquals("-1", result); + assertEquals("#Error", result); } } From cbbe7098dacdfd31b4940e0d6b13a8052fb3b1bc Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 7 Oct 2016 16:41:54 +0300 Subject: [PATCH 26/28] besouro automatic message --- .besouro/20161007161542914/actions.txt | 3 +++ bin/SpreadsheetTest.class | Bin 1320 -> 1340 bytes src/Spreadsheet.java | 13 ++++--------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.besouro/20161007161542914/actions.txt b/.besouro/20161007161542914/actions.txt index 679c12b..c2556dc 100644 --- a/.besouro/20161007161542914/actions.txt +++ b/.besouro/20161007161542914/actions.txt @@ -75,3 +75,6 @@ RefactoringAction 1475847617001 SpreadsheetTest.java RENAME test_evaluateCorrect RefactoringAction 1475847621634 SpreadsheetTest.java RENAME test_evaluateInvalidFormattedCellNegativeInteger()=>void test_evaluateInvalidFormattedCellInteger() METHOD EditAction 1475847622773 SpreadsheetTest.java 831 4 11 4 EditAction 1475847650494 SpreadsheetTest.java 835 4 11 4 +UnitTestCaseAction 1475847657720 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847657720 SpreadsheetTest.java FAIL +EditAction 1475847713397 Spreadsheet.java 362 3 3 0 diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index dd6b79c8b076f82873984e6af82dad1553254490..75cf5747ab1c415dadd0769f227d2a4c7fffb78d 100644 GIT binary patch delta 73 zcmZ3%wTFxA)W2Q(7#J8#7_2sO9bppYU@&E5U~)9(U@&K7U{iK2D$3t{mWhQ)z+@YP djMf$gej$l%4B9?IW|JSXIIvp)buuwn0sy-X5Y_+y delta 40 vcmdnPwStT5)W2Q(7#J8#7|b?u9bwx1h>4kLaz2a7WKLEcb`zik6N4!L6rKvR diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e5cc748..4014d2a 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -4,21 +4,16 @@ public class Spreadsheet { private HashMap sheetmap = new HashMap(); - public String get(String cell) { - // to be implemented - - return sheetmap.get(cell); - - + public String get(String cell) { + return sheetmap.get(cell); } - public void set(String cell, String value) { - // to be implemented + public void set(String cell, String value) { sheetmap.put(cell,value); } public String evaluate(String cell) { - // to be implemented + return sheetmap.get(cell); } From a4d6d234e7ca4c758a0e578383e07a174b42086e Mon Sep 17 00:00:00 2001 From: julaakko Date: Fri, 7 Oct 2016 16:43:31 +0300 Subject: [PATCH 27/28] Assigment started --- bin/Spreadsheet.class | Bin 973 -> 973 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index d5dfcbd859cd161e85d0a106611d8f1586be5fe7..2b1ae4bc29b193bec02932d0b3e3edb41851bb2e 100644 GIT binary patch delta 37 rcmX@hewKa1UnWM5$^V#qSa}$@7 Date: Fri, 14 Oct 2016 16:52:30 +0300 Subject: [PATCH 28/28] Assigment, requirements 8-9 --- src/Spreadsheet.java | 47 ++++++++++++++- tests/SpreadsheetTest.java | 120 ++++++++++++++++++++++++++++++++++--- 2 files changed, 157 insertions(+), 10 deletions(-) diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index 4014d2a..927d433 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -3,6 +3,7 @@ public class Spreadsheet { private HashMap sheetmap = new HashMap(); + private static final String ERROR = "#Error"; public String get(String cell) { return sheetmap.get(cell); @@ -14,8 +15,52 @@ public void set(String cell, String value) { public String evaluate(String cell) { - return sheetmap.get(cell); + String content = get(cell); + if(isCellReference(content)) + content = get(content); + + return validateCell(content); } + + private boolean isCellReference(String contents) { + return sheetmap.containsKey(contents); + } + + private boolean checkFormula(String contents) { + if(contents.startsWith("=")) + return true; + return false; + } + + private boolean checkString(String contents) { + if(contents.startsWith("'") && contents.endsWith("'")) + return true; + else + return false; + } + + private boolean checkInteger(String contents) { + try { + Integer.parseInt(contents); + + } catch (NumberFormatException exp) { + return false; + } + return true; + } + + private String validateCell(String contents) { + + if(checkFormula(contents)) + return validateCell(contents.substring(1,contents.length())); + + if(checkString(contents)) + return contents.substring(1, contents.length()-1); + if(checkInteger(contents)) + return contents; + + return ERROR; + } } diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 40a153b..32f4cae 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -6,6 +6,15 @@ public class SpreadsheetTest { + private static final String ERROR = "#Error"; + private static final String VALID_INPUT_A_STRING_CATCHES = "'A string catches'"; + private static final String VALID_INPUT_FORMULA_A_STRING_CATCHES = "='A string catches'"; + private static final String INVALID_INPUT_FORMULA_A_STRING_CATCHES = "A string catches'"; + private static final String VALID_EVALUATE_A_STRING_CATCHES = "A string catches"; + private static final String STRING_FAIL_BOAT_START_WRONG = "Fail boat'"; + private static final String STRING_FAIL_BOAT_END_WRONG = "'Fail boat"; + private static final String STRING_FAIL_BOAT_NO_QUOTES = "Fail boat"; + private Spreadsheet test_sheet = new Spreadsheet(); @Test @@ -17,22 +26,115 @@ public void test_setCellToValueStringA1_1() { @Test public void test_evaluateCorrectlyFormattedCellPositiveInteger() { test_sheet.set("A1", "1"); - String result = test_sheet.evaluate("A1"); - assertEquals("1", result); - + assertEquals("1", evaluateCell("A1")); } @Test public void test_evaluateCorrectlyFormattedCellNegativeInteger() { - test_sheet.set("A1", "-1"); - String result = test_sheet.evaluate("A1"); - assertEquals("-1", result); + test_sheet.set("A1", "-1"); + assertEquals("-1", evaluateCell("A1")); } @Test public void test_evaluateInvalidFormattedCellInteger() { - test_sheet.set("A1", "A3"); - String result = test_sheet.evaluate("A1"); - assertEquals("#Error", result); + test_sheet.set("A1", "A3"); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateCatchesDecimalsInCellSeparatorDot() { + test_sheet.set("A1", "4.2"); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateCatchesDecimalsInCellSeparatorComma() { + test_sheet.set("A1", "4,2"); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_canSetGetStringsCell() { + test_sheet.set("A7", VALID_INPUT_A_STRING_CATCHES); + String result = test_sheet.get("A7"); + assertEquals(VALID_INPUT_A_STRING_CATCHES, result); + } + + @Test + public void test_evaluateValidQuotedStringReturnsUnquotedString() { + test_sheet.set("A1", VALID_INPUT_A_STRING_CATCHES); + assertEquals(VALID_EVALUATE_A_STRING_CATCHES, evaluateCell("A1")); + } + + @Test + public void test_evaluateInvalidNonQuotedString() { + test_sheet.set("A1", STRING_FAIL_BOAT_NO_QUOTES); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateInvalidQuotedStringStart() { + test_sheet.set("A1", STRING_FAIL_BOAT_START_WRONG); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateInvalidEndQuotedString() { + test_sheet.set("A1", STRING_FAIL_BOAT_END_WRONG); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateSimpleFormulaIntegerInput() { + test_sheet.set("A1", "=1"); + assertEquals("1", evaluateCell("A1")); + } + + @Test + public void test_evaluateSimpleFormulaSignedIntegerInput() { + test_sheet.set("A1", "=-11"); + assertEquals("-11", evaluateCell("A1")); + } + + @Test + public void test_evaluateSimpleFormulaInvalidIntegerInput() { + test_sheet.set("A1", "=A51"); + assertEquals(ERROR, evaluateCell("A1")); } + + @Test + public void test_evaluateSimpleFormulaStringInput() { + test_sheet.set("A1", VALID_INPUT_FORMULA_A_STRING_CATCHES); + assertEquals(VALID_EVALUATE_A_STRING_CATCHES, evaluateCell("A1")); + } + + @Test + public void test_evaluateSimpleFormulateInvalidStringInput() { + test_sheet.set("A1", INVALID_INPUT_FORMULA_A_STRING_CATCHES); + assertEquals(ERROR, evaluateCell("A1")); + } + + @Test + public void test_evaluateFormulaReferencesReturnsLastCellContentSingleRerence() { + test_sheet.set("A1", "A5"); + test_sheet.set("A5", "1"); + assertEquals("1", evaluateCell("A1")); + } + + /* Run in to corner with this, trying to see if moving forward helps to bubble up better solution + * ... and then i realized the re-factoring i did was wrong... + @Test + public void test_evaluateFormulaReferencesReturnsLastCellContent3ChainRerence() { + test_sheet.set("A1", "A5"); + test_sheet.set("A5", "A3"); + test_sheet.set("A3", "A7"); + test_sheet.set("A7", "1"); + assertEquals("1", evaluateCell("A1")); + }*/ + + + private String evaluateCell(String cell) { + return test_sheet.evaluate(cell); + } + }