diff --git a/.besouro/20161007141352402/actions.txt b/.besouro/20161007141352402/actions.txt new file mode 100644 index 0000000..06fda41 --- /dev/null +++ b/.besouro/20161007141352402/actions.txt @@ -0,0 +1,496 @@ +FileOpenedAction 1475838832611 SpreadsheetTest.java 162 1 1 1 +EditAction 1475838841813 SpreadsheetTest.java 203 1 1 1 +UnitTestCaseAction 1475838842296 SpreadsheetTest.java OK +UnitTestSessionAction 1475838842297 SpreadsheetTest.java OK +RefactoringAction 1475838864280 SpreadsheetTest.java ADD void s FIELD +RefactoringAction 1475838866798 SpreadsheetTest.java RENAME s=>void spreadsheet_ FIELD +RefactoringAction 1475838869321 SpreadsheetTest.java RENAME spreadsheet_=>void spreadsheet_set_a FIELD +RefactoringAction 1475838871845 SpreadsheetTest.java RENAME spreadsheet_set_a=>void spreadsheet_set_a1_1() METHOD +RefactoringAction 1475839138870 Spreadsheet.java ADD Map my FIELD +RefactoringAction 1475839144887 Spreadsheet.java RENAME my=>Map map FIELD +RefactoringAction 1475839250031 Spreadsheet.java ADD import java.util.Map IMPORT +RefactoringAction 1475839254049 Spreadsheet.java RENAME import java.util.Map=>import java.util.* IMPORT +RefactoringAction 1475839266062 Spreadsheet.java REMOVE map FIELD +RefactoringAction 1475839268586 Spreadsheet.java ADD Map map FIELD +EditAction 1475839278957 Spreadsheet.java 347 3 2 0 +EditAction 1475839282715 SpreadsheetTest.java 285 2 2 1 +EditAction 1475839330770 SpreadsheetTest.java 343 2 4 2 +UnitTestCaseAction 1475839333153 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475839333154 SpreadsheetTest.java FAIL +EditAction 1475839396017 Spreadsheet.java 383 3 2 0 +CompilationAction 1475839396134 Spreadsheet.java +CompilationAction 1475839401448 Spreadsheet.java +CompilationAction 1475839401803 Spreadsheet.java +CompilationAction 1475839456403 Spreadsheet.java +CompilationAction 1475839456579 Spreadsheet.java +CompilationAction 1475839521675 Spreadsheet.java +EditAction 1475839556426 Spreadsheet.java 420 3 3 0 +EditAction 1475839594547 Spreadsheet.java 455 3 4 0 +EditAction 1475839634776 Spreadsheet.java 446 3 4 0 +EditAction 1475839674377 Spreadsheet.java 465 3 4 0 +CompilationAction 1475839674485 Spreadsheet.java +CompilationAction 1475839682215 Spreadsheet.java +EditAction 1475839686308 Spreadsheet.java 477 3 4 0 +UnitTestCaseAction 1475839699452 SpreadsheetTest.java OK +UnitTestSessionAction 1475839699452 SpreadsheetTest.java OK +RefactoringAction 1475839713866 SpreadsheetTest.java ADD void spreadsheet_get_ FIELD +RefactoringAction 1475839717879 SpreadsheetTest.java RENAME spreadsheet_get_=>void spreadsheet_get_error FIELD +RefactoringAction 1475839721392 SpreadsheetTest.java RENAME spreadsheet_get_error=>void spreadsheet_get_error() METHOD +RefactoringAction 1475839753964 SpreadsheetTest.java REMOVE ss FIELD +EditAction 1475839763365 SpreadsheetTest.java 488 3 8 2 +EditAction 1475839773338 SpreadsheetTest.java 501 3 9 2 +EditAction 1475839801077 SpreadsheetTest.java 531 3 9 3 +UnitTestCaseAction 1475839803004 SpreadsheetTest.java OK +UnitTestSessionAction 1475839803004 SpreadsheetTest.java OK +EditAction 1475839813876 Spreadsheet.java 471 3 4 0 +RefactoringAction 1475839832190 SpreadsheetTest.java ADD void spreadsheet_set_a1_1()/2 METHOD +RefactoringAction 1475839834706 SpreadsheetTest.java RENAME spreadsheet_set_a1_1()/2=>void spreadsheet_set_a1_() METHOD +RefactoringAction 1475839839222 SpreadsheetTest.java RENAME spreadsheet_set_a1_()=>void spreadsheet_set_a1_teststring() METHOD +EditAction 1475839850569 SpreadsheetTest.java 728 4 13 4 +UnitTestCaseAction 1475839852104 SpreadsheetTest.java OK +UnitTestSessionAction 1475839852104 SpreadsheetTest.java OK +EditAction 1475839862861 SpreadsheetTest.java 702 4 12 4 +RefactoringAction 1475840057331 SpreadsheetTest.java ADD void spreadsheet_evaluate FIELD +RefactoringAction 1475840065346 SpreadsheetTest.java RENAME spreadsheet_evaluate=>void spreadsheet_evaluate_negative() METHOD +EditAction 1475840075075 SpreadsheetTest.java 874 5 15 5 +EditAction 1475840084440 SpreadsheetTest.java 875 5 15 5 +EditAction 1475840091058 SpreadsheetTest.java 865 5 15 5 +UnitTestCaseAction 1475840101713 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475840101714 SpreadsheetTest.java FAIL +EditAction 1475840118574 Spreadsheet.java 460 3 4 0 +EditAction 1475840174860 Spreadsheet.java 539 3 6 0 +UnitTestCaseAction 1475840176154 SpreadsheetTest.java OK +UnitTestSessionAction 1475840176154 SpreadsheetTest.java OK +RefactoringAction 1475840227953 SpreadsheetTest.java ADD void spreadsheet_evaluate_negative()/2 METHOD +RefactoringAction 1475840235467 SpreadsheetTest.java RENAME spreadsheet_evaluate_negative()/2=>void spreadsheet_evaluate_wrong() METHOD +RefactoringAction 1475840244988 SpreadsheetTest.java RENAME spreadsheet_evaluate_wrong()=>void spreadsheet_evaluate_wrongFormattedInt() METHOD +EditAction 1475840246757 SpreadsheetTest.java 1035 6 18 6 +RefactoringAction 1475840250502 SpreadsheetTest.java RENAME spreadsheet_evaluate_wrongFormattedInt()=>void spreadsheet_evaluate_wronglyFormattedInt() METHOD +EditAction 1475840251366 SpreadsheetTest.java 1037 6 18 6 +EditAction 1475840265529 SpreadsheetTest.java 1041 6 18 6 +EditAction 1475840269427 SpreadsheetTest.java 1045 6 18 6 +UnitTestCaseAction 1475840271097 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475840271097 SpreadsheetTest.java FAIL +EditAction 1475840339636 Spreadsheet.java 582 3 3 0 +CompilationAction 1475840339741 Spreadsheet.java +CompilationAction 1475840344213 Spreadsheet.java +CompilationAction 1475840344390 Spreadsheet.java +CompilationAction 1475840344391 Spreadsheet.java +CompilationAction 1475840382337 Spreadsheet.java +CompilationAction 1475840382337 Spreadsheet.java +CompilationAction 1475840382519 Spreadsheet.java +CompilationAction 1475840382520 Spreadsheet.java +CompilationAction 1475840386106 Spreadsheet.java +CompilationAction 1475840386107 Spreadsheet.java +CompilationAction 1475840386240 Spreadsheet.java +CompilationAction 1475840386241 Spreadsheet.java +CompilationAction 1475840400246 Spreadsheet.java +CompilationAction 1475840400247 Spreadsheet.java +CompilationAction 1475840400416 Spreadsheet.java +CompilationAction 1475840400416 Spreadsheet.java +CompilationAction 1475840403043 Spreadsheet.java +CompilationAction 1475840403043 Spreadsheet.java +CompilationAction 1475840403222 Spreadsheet.java +CompilationAction 1475840403223 Spreadsheet.java +EditAction 1475840410470 Spreadsheet.java 673 3 9 0 +EditAction 1475840627336 Spreadsheet.java 679 3 6 0 +CompilationAction 1475840627446 Spreadsheet.java +CompilationAction 1475840713823 Spreadsheet.java +EditAction 1475840742675 Spreadsheet.java 767 3 7 0 +EditAction 1475840779144 Spreadsheet.java 770 3 7 0 +EditAction 1475840842052 Spreadsheet.java 816 3 8 0 +EditAction 1475840874313 Spreadsheet.java 815 3 8 0 +EditAction 1475840882346 Spreadsheet.java 799 3 8 0 +EditAction 1475840916276 Spreadsheet.java 876 3 10 0 +EditAction 1475840953177 Spreadsheet.java 903 3 10 0 +EditAction 1475840984572 Spreadsheet.java 892 3 10 0 +EditAction 1475841003961 Spreadsheet.java 944 3 10 0 +EditAction 1475841008479 Spreadsheet.java 945 3 10 0 +UnitTestCaseAction 1475841014549 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841014549 SpreadsheetTest.java FAIL +EditAction 1475841088793 Spreadsheet.java 1006 3 3 0 +CompilationAction 1475841088885 Spreadsheet.java +CompilationAction 1475841126880 Spreadsheet.java +CompilationAction 1475841127062 Spreadsheet.java +CompilationAction 1475841127062 Spreadsheet.java +CompilationAction 1475841157825 Spreadsheet.java +CompilationAction 1475841157826 Spreadsheet.java +CompilationAction 1475841158004 Spreadsheet.java +CompilationAction 1475841158005 Spreadsheet.java +CompilationAction 1475841169869 Spreadsheet.java +CompilationAction 1475841169869 Spreadsheet.java +CompilationAction 1475841170050 Spreadsheet.java +CompilationAction 1475841170050 Spreadsheet.java +CompilationAction 1475841170050 Spreadsheet.java +CompilationAction 1475841177746 Spreadsheet.java +CompilationAction 1475841177924 Spreadsheet.java +CompilationAction 1475841177924 Spreadsheet.java +CompilationAction 1475841181698 Spreadsheet.java +CompilationAction 1475841181840 Spreadsheet.java +EditAction 1475841218236 Spreadsheet.java 1084 3 11 0 +EditAction 1475841223094 Spreadsheet.java 1089 3 11 0 +EditAction 1475841252441 Spreadsheet.java 1093 3 11 0 +EditAction 1475841259958 Spreadsheet.java 1089 3 11 0 +EditAction 1475841300326 Spreadsheet.java 1119 3 12 0 +EditAction 1475841309953 Spreadsheet.java 1142 3 12 0 +EditAction 1475841344840 Spreadsheet.java 1169 3 13 0 +EditAction 1475841363108 Spreadsheet.java 1185 3 13 0 +EditAction 1475841379831 Spreadsheet.java 1189 3 12 0 +EditAction 1475841391929 Spreadsheet.java 1185 3 13 0 +EditAction 1475841460489 Spreadsheet.java 1195 3 12 0 +EditAction 1475841484584 Spreadsheet.java 1249 3 12 0 +EditAction 1475841486766 Spreadsheet.java 1243 3 12 0 +UnitTestCaseAction 1475841488228 SpreadsheetTest.java OK +UnitTestSessionAction 1475841488228 SpreadsheetTest.java OK +EditAction 1475841607682 Spreadsheet.java 1352 3 12 0 +UnitTestCaseAction 1475841615011 SpreadsheetTest.java OK +UnitTestSessionAction 1475841615012 SpreadsheetTest.java OK +EditAction 1475841674538 SpreadsheetTest.java 1047 6 18 6 +EditAction 1475841734156 Spreadsheet.java 1443 3 12 0 +EditAction 1475841738627 Spreadsheet.java 1449 3 12 0 +EditAction 1475841746580 Spreadsheet.java 1477 3 13 0 +EditAction 1475841753157 Spreadsheet.java 1498 3 13 0 +EditAction 1475841789588 Spreadsheet.java 1533 3 3 0 +CompilationAction 1475841789693 Spreadsheet.java +CompilationAction 1475841789693 Spreadsheet.java +RefactoringAction 1475841808220 Spreadsheet.java ADD String delete FIELD +RefactoringAction 1475841810737 Spreadsheet.java REMOVE delete FIELD +RefactoringAction 1475841812766 Spreadsheet.java ADD String Cut FIELD +RefactoringAction 1475841822282 Spreadsheet.java RENAME Cut=>String RemoveQuotes() METHOD +RefactoringAction 1475841828313 Spreadsheet.java RENAME RemoveQuotes()=>String RemoveQuotes(String) METHOD +EditAction 1475841841646 Spreadsheet.java 1602 4 4 0 +CompilationAction 1475841841753 Spreadsheet.java +CompilationAction 1475841841754 Spreadsheet.java +EditAction 1475841854407 Spreadsheet.java 1622 4 15 0 +EditAction 1475841869771 Spreadsheet.java 1673 4 15 0 +EditAction 1475841876198 Spreadsheet.java 1673 4 15 0 +UnitTestCaseAction 1475841880701 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841880702 SpreadsheetTest.java FAIL +EditAction 1475841889778 Spreadsheet.java 1670 4 15 0 +EditAction 1475841956857 Spreadsheet.java 1690 4 15 0 +UnitTestCaseAction 1475841968683 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841968683 SpreadsheetTest.java FAIL +EditAction 1475841983011 SpreadsheetTest.java 1047 6 18 6 +UnitTestCaseAction 1475841992732 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475841992732 SpreadsheetTest.java FAIL +EditAction 1475842123890 Spreadsheet.java 1701 4 15 0 +UnitTestCaseAction 1475842125529 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842125530 SpreadsheetTest.java FAIL +RefactoringAction 1475842255389 Spreadsheet.java REMOVE RemoveQuotes(String) METHOD +RefactoringAction 1475842257908 Spreadsheet.java ADD String RemoveQuotes(String) METHOD +UnitTestCaseAction 1475842279697 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842279697 SpreadsheetTest.java FAIL +EditAction 1475842299847 Spreadsheet.java 1704 4 15 0 +UnitTestCaseAction 1475842331823 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842331824 SpreadsheetTest.java FAIL +RefactoringAction 1475842418298 SpreadsheetTest.java ADD void spreadsheet_get_ValueNotFoundError() METHOD +EditAction 1475842428986 SpreadsheetTest.java 1222 7 21 7 +EditAction 1475842436134 SpreadsheetTest.java 1227 7 21 7 +UnitTestCaseAction 1475842437411 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842437412 SpreadsheetTest.java FAIL +RefactoringAction 1475842449344 SpreadsheetTest.java REMOVE spreadsheet_set_a1_teststring() METHOD +RefactoringAction 1475842452363 SpreadsheetTest.java ADD void spreadsheet_set_a1_teststring() METHOD +EditAction 1475842453391 SpreadsheetTest.java 1223 7 21 7 +EditAction 1475842479481 Spreadsheet.java 1608 4 14 0 +RefactoringAction 1475842486790 Spreadsheet.java REMOVE RemoveQuotes(String) METHOD +EditAction 1475842490393 Spreadsheet.java 1517 3 13 0 +UnitTestCaseAction 1475842500361 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842500361 SpreadsheetTest.java FAIL +EditAction 1475842505118 Spreadsheet.java 1496 3 13 0 +EditAction 1475842561037 Spreadsheet.java 1556 3 13 0 +CompilationAction 1475842561517 Spreadsheet.java +CompilationAction 1475842573826 Spreadsheet.java +UnitTestCaseAction 1475842576083 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842576084 SpreadsheetTest.java FAIL +EditAction 1475842604895 Spreadsheet.java 1611 3 13 0 +UnitTestCaseAction 1475842606539 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842606540 SpreadsheetTest.java FAIL +EditAction 1475842645312 Spreadsheet.java 1571 3 13 0 +EditAction 1475842666132 Spreadsheet.java 1576 3 13 0 +UnitTestCaseAction 1475842680806 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842680806 SpreadsheetTest.java FAIL +RefactoringAction 1475842696192 Spreadsheet.java ADD boolean is FIELD +RefactoringAction 1475842697707 Spreadsheet.java REMOVE is FIELD +RefactoringAction 1475842698720 Spreadsheet.java ADD boolean is FIELD +RefactoringAction 1475842702736 Spreadsheet.java RENAME is=>boolean get FIELD +RefactoringAction 1475842708251 Spreadsheet.java RENAME get=>boolean getIsString() METHOD +RefactoringAction 1475842717764 Spreadsheet.java REMOVE getIsString() METHOD +EditAction 1475842718870 Spreadsheet.java 1576 3 13 0 +EditAction 1475842777733 Spreadsheet.java 1599 3 13 0 +UnitTestCaseAction 1475842779275 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842779275 SpreadsheetTest.java FAIL +EditAction 1475842796249 Spreadsheet.java 1576 3 13 0 +EditAction 1475842806316 Spreadsheet.java 1574 3 13 0 +UnitTestCaseAction 1475842807918 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842807918 SpreadsheetTest.java FAIL +EditAction 1475842815460 Spreadsheet.java 1576 3 13 0 +EditAction 1475842854673 Spreadsheet.java 1587 3 13 0 +UnitTestCaseAction 1475842856221 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842856222 SpreadsheetTest.java FAIL +EditAction 1475842876875 Spreadsheet.java 1576 3 13 0 +EditAction 1475842898461 Spreadsheet.java 1588 3 13 0 +UnitTestCaseAction 1475842899636 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842899636 SpreadsheetTest.java FAIL +EditAction 1475842908022 Spreadsheet.java 1576 3 13 0 +UnitTestCaseAction 1475842961853 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475842961853 SpreadsheetTest.java FAIL +EditAction 1475842985743 SpreadsheetTest.java 1228 7 21 7 +UnitTestCaseAction 1475842997833 SpreadsheetTest.java OK +UnitTestSessionAction 1475842997834 SpreadsheetTest.java OK +EditAction 1475843044970 Spreadsheet.java 1571 3 13 0 +UnitTestCaseAction 1475843052884 SpreadsheetTest.java OK +UnitTestSessionAction 1475843052884 SpreadsheetTest.java OK +RefactoringAction 1475843064460 SpreadsheetTest.java ADD void spreadsheet_set_ FIELD +RefactoringAction 1475843065971 SpreadsheetTest.java RENAME spreadsheet_set_=>void spreadsheet_set_a1_ FIELD +RefactoringAction 1475843067983 SpreadsheetTest.java RENAME spreadsheet_set_a1_=>void spreadsheet_set_a1_test FIELD +RefactoringAction 1475843069494 SpreadsheetTest.java RENAME spreadsheet_set_a1_test=>void spreadsheet_set_a1_teststring_ FIELD +RefactoringAction 1475843074507 SpreadsheetTest.java RENAME spreadsheet_set_a1_teststring_=>void spreadsheet_evaluate FIELD +RefactoringAction 1475843078520 SpreadsheetTest.java RENAME spreadsheet_set_a1_teststring()=>void spreadsheet_evaluate_a1_teststring() METHOD +RefactoringAction 1475843081031 SpreadsheetTest.java RENAME spreadsheet_evaluate=>void spreadsheet_evaluate_ FIELD +RefactoringAction 1475843083543 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_wrong FIELD +RefactoringAction 1475843086054 SpreadsheetTest.java RENAME spreadsheet_evaluate_wrong=>void spreadsheet_evaluate_ FIELD +RefactoringAction 1475843087565 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_in FIELD +RefactoringAction 1475843089076 SpreadsheetTest.java RENAME spreadsheet_evaluate_in=>void spreadsheet_evaluate_incorrect FIELD +RefactoringAction 1475843092087 SpreadsheetTest.java RENAME spreadsheet_evaluate_incorrect=>void spreadsheet_evaluate_incorrect_string() METHOD +EditAction 1475843105957 SpreadsheetTest.java 1417 8 24 8 +UnitTestCaseAction 1475843108135 SpreadsheetTest.java OK +UnitTestSessionAction 1475843108136 SpreadsheetTest.java OK +EditAction 1475843254069 Spreadsheet.java 1577 3 13 0 +EditAction 1475843398818 Spreadsheet.java 1706 3 13 0 +EditAction 1475843481458 Spreadsheet.java 1784 3 13 0 +EditAction 1475843500026 Spreadsheet.java 1786 3 13 0 +EditAction 1475843506894 Spreadsheet.java 1791 3 13 0 +RefactoringAction 1475843593700 SpreadsheetTest.java ADD void spreadsheet FIELD +RefactoringAction 1475843595210 SpreadsheetTest.java RENAME spreadsheet=>void spreadsheet_eva FIELD +RefactoringAction 1475843596721 SpreadsheetTest.java RENAME spreadsheet_eva=>void spreadsheet_evaluate FIELD +RefactoringAction 1475843598734 SpreadsheetTest.java RENAME spreadsheet_evaluate=>void spreadsheet_evaluate_ FIELD +RefactoringAction 1475843608747 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_simple_formula() METHOD +RefactoringAction 1475843614759 SpreadsheetTest.java RENAME spreadsheet_evaluate_simple_formula()=>void spreadsheet_evaluate_simple_equals_formula() METHOD +EditAction 1475843615871 SpreadsheetTest.java 1485 9 24 8 +EditAction 1475843651613 SpreadsheetTest.java 1602 9 27 9 +UnitTestCaseAction 1475843654879 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475843654880 SpreadsheetTest.java FAIL +EditAction 1475843892913 Spreadsheet.java 1822 3 13 0 +EditAction 1475844175915 Spreadsheet.java 1869 3 13 0 +UnitTestCaseAction 1475844185929 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844185930 SpreadsheetTest.java FAIL +EditAction 1475844210431 Spreadsheet.java 1878 3 13 0 +EditAction 1475844231253 Spreadsheet.java 1913 3 13 0 +EditAction 1475844353013 Spreadsheet.java 2047 3 13 0 +EditAction 1475844399051 Spreadsheet.java 2074 3 13 0 +EditAction 1475844423879 Spreadsheet.java 2085 3 13 0 +EditAction 1475844455800 Spreadsheet.java 2131 3 13 0 +EditAction 1475844618132 Spreadsheet.java 2151 3 13 0 +EditAction 1475844628950 Spreadsheet.java 2157 3 13 0 +EditAction 1475844630957 Spreadsheet.java 2169 3 13 0 +EditAction 1475844635428 Spreadsheet.java 2181 3 13 0 +UnitTestCaseAction 1475844664901 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844664901 SpreadsheetTest.java FAIL +EditAction 1475844737942 Spreadsheet.java 2256 3 13 0 +EditAction 1475844746448 Spreadsheet.java 2303 3 13 0 +EditAction 1475844792888 Spreadsheet.java 2360 3 3 0 +CompilationAction 1475844792977 Spreadsheet.java +CompilationAction 1475844792977 Spreadsheet.java +EditAction 1475844804448 Spreadsheet.java 2385 3 3 0 +CompilationAction 1475844804580 Spreadsheet.java +CompilationAction 1475844804580 Spreadsheet.java +EditAction 1475844825083 Spreadsheet.java 2413 3 3 0 +CompilationAction 1475844825186 Spreadsheet.java +CompilationAction 1475844825186 Spreadsheet.java +CompilationAction 1475844858378 Spreadsheet.java +CompilationAction 1475844858379 Spreadsheet.java +CompilationAction 1475844858520 Spreadsheet.java +CompilationAction 1475844858520 Spreadsheet.java +CompilationAction 1475844873151 Spreadsheet.java +CompilationAction 1475844873152 Spreadsheet.java +CompilationAction 1475844873326 Spreadsheet.java +CompilationAction 1475844873326 Spreadsheet.java +CompilationAction 1475844878865 Spreadsheet.java +CompilationAction 1475844878866 Spreadsheet.java +CompilationAction 1475844879013 Spreadsheet.java +CompilationAction 1475844879013 Spreadsheet.java +EditAction 1475844909666 Spreadsheet.java 2471 3 3 0 +CompilationAction 1475844909766 Spreadsheet.java +CompilationAction 1475844909767 Spreadsheet.java +CompilationAction 1475844920115 Spreadsheet.java +CompilationAction 1475844920116 Spreadsheet.java +CompilationAction 1475844920258 Spreadsheet.java +CompilationAction 1475844920258 Spreadsheet.java +EditAction 1475844939647 Spreadsheet.java 2542 3 13 0 +UnitTestCaseAction 1475844940955 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844940956 SpreadsheetTest.java FAIL +EditAction 1475844950860 Spreadsheet.java 2542 3 13 0 +UnitTestCaseAction 1475844951973 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844951974 SpreadsheetTest.java FAIL +EditAction 1475844955935 Spreadsheet.java 2542 3 13 0 +UnitTestCaseAction 1475844958325 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475844958325 SpreadsheetTest.java FAIL +EditAction 1475844972803 SpreadsheetTest.java 1602 9 27 9 +EditAction 1475845003937 Spreadsheet.java 2542 3 13 0 +UnitTestCaseAction 1475845005501 SpreadsheetTest.java OK +UnitTestSessionAction 1475845005501 SpreadsheetTest.java OK +RefactoringAction 1475845027920 SpreadsheetTest.java ADD void spreadsheet FIELD +RefactoringAction 1475845029932 SpreadsheetTest.java RENAME spreadsheet=>void spreadsheet_evaluate_ FIELD +RefactoringAction 1475845033444 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_simple_equals_forum FIELD +RefactoringAction 1475845037453 SpreadsheetTest.java RENAME spreadsheet_evaluate_simple_equals_forum=>void spreadsheet_evaluate_simple_equals_formula_error() METHOD +EditAction 1475845046742 SpreadsheetTest.java 1795 10 30 10 +EditAction 1475845049730 SpreadsheetTest.java 1791 10 30 10 +UnitTestCaseAction 1475845051003 SpreadsheetTest.java OK +UnitTestSessionAction 1475845051003 SpreadsheetTest.java OK +RefactoringAction 1475845060493 SpreadsheetTest.java ADD void spreadsheed FIELD +RefactoringAction 1475845062506 SpreadsheetTest.java RENAME spreadsheed=>void spreadsheet_ FIELD +RefactoringAction 1475845118521 SpreadsheetTest.java RENAME spreadsheet_=>void spreadsheet_evaluate_ FIELD +RefactoringAction 1475845123034 SpreadsheetTest.java RENAME spreadsheet_evaluate_simple_equals_formula_error()=>void spreadsheet_evaluate_simple_equals_formula_string_error() METHOD +RefactoringAction 1475845128547 SpreadsheetTest.java RENAME spreadsheet_evaluate_simple_equals_formula()=>void spreadsheet_evaluate_simple_equals_formula_string() METHOD +RefactoringAction 1475845136558 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_simple_equals_formula_ FIELD +EditAction 1475845140078 SpreadsheetTest.java 1871 10 30 10 +CompilationAction 1475845140178 SpreadsheetTest.java +CompilationAction 1475845140179 SpreadsheetTest.java +CompilationAction 1475845140179 SpreadsheetTest.java +RefactoringAction 1475845162080 SpreadsheetTest.java RENAME spreadsheet_evaluate_simple_equals_formula_=>void spreadsheet_evaluate_simple_equals_formula_negative_int() METHOD +EditAction 1475845172451 SpreadsheetTest.java 1992 11 33 11 +UnitTestCaseAction 1475845174438 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475845174438 SpreadsheetTest.java FAIL +EditAction 1475845184280 Spreadsheet.java 2530 3 13 0 +EditAction 1475845188155 Spreadsheet.java 2526 3 13 0 +EditAction 1475845292337 Spreadsheet.java 2553 3 13 0 +EditAction 1475845311069 Spreadsheet.java 2581 3 13 0 +EditAction 1475845367411 Spreadsheet.java 2583 3 13 0 +EditAction 1475845382682 Spreadsheet.java 2616 3 13 0 +EditAction 1475845398698 Spreadsheet.java 2652 3 13 0 +EditAction 1475845436271 Spreadsheet.java 2658 3 13 0 +EditAction 1475845439151 Spreadsheet.java 2658 3 13 0 +EditAction 1475845490267 Spreadsheet.java 2678 3 13 0 +EditAction 1475845517800 Spreadsheet.java 2736 3 13 0 +EditAction 1475845523761 Spreadsheet.java 2736 3 13 0 +EditAction 1475845837423 Spreadsheet.java 2899 3 13 0 +EditAction 1475845942991 Spreadsheet.java 2900 3 13 0 +EditAction 1475846082550 Spreadsheet.java 2983 3 13 0 +EditAction 1475846084568 Spreadsheet.java 2984 3 13 0 +EditAction 1475846128925 Spreadsheet.java 2873 3 13 0 +UnitTestCaseAction 1475846131608 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846131608 SpreadsheetTest.java FAIL +EditAction 1475846252893 Spreadsheet.java 2967 3 12 0 +CompilationAction 1475846252998 Spreadsheet.java +CompilationAction 1475846252998 Spreadsheet.java +CompilationAction 1475846252998 Spreadsheet.java +CompilationAction 1475846252998 Spreadsheet.java +CompilationAction 1475846252999 Spreadsheet.java +CompilationAction 1475846252999 Spreadsheet.java +CompilationAction 1475846252999 Spreadsheet.java +CompilationAction 1475846258432 Spreadsheet.java +CompilationAction 1475846258433 Spreadsheet.java +CompilationAction 1475846258434 Spreadsheet.java +CompilationAction 1475846258435 Spreadsheet.java +CompilationAction 1475846258435 Spreadsheet.java +CompilationAction 1475846258436 Spreadsheet.java +CompilationAction 1475846258437 Spreadsheet.java +CompilationAction 1475846258606 Spreadsheet.java +CompilationAction 1475846258607 Spreadsheet.java +CompilationAction 1475846258607 Spreadsheet.java +CompilationAction 1475846258607 Spreadsheet.java +CompilationAction 1475846258608 Spreadsheet.java +CompilationAction 1475846258608 Spreadsheet.java +CompilationAction 1475846258608 Spreadsheet.java +CompilationAction 1475846280061 Spreadsheet.java +CompilationAction 1475846280062 Spreadsheet.java +CompilationAction 1475846280063 Spreadsheet.java +CompilationAction 1475846280063 Spreadsheet.java +CompilationAction 1475846280064 Spreadsheet.java +CompilationAction 1475846280065 Spreadsheet.java +CompilationAction 1475846280065 Spreadsheet.java +UnitTestCaseAction 1475846284649 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846284649 SpreadsheetTest.java FAIL +EditAction 1475846289507 Spreadsheet.java 2991 3 13 0 +UnitTestCaseAction 1475846290875 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846290875 SpreadsheetTest.java FAIL +EditAction 1475846293625 Spreadsheet.java 2988 3 13 0 +EditAction 1475846339686 Spreadsheet.java 2996 3 13 0 +UnitTestCaseAction 1475846342912 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846342913 SpreadsheetTest.java FAIL +EditAction 1475846347028 Spreadsheet.java 2971 3 13 0 +UnitTestCaseAction 1475846348252 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846348253 SpreadsheetTest.java FAIL +EditAction 1475846378272 Spreadsheet.java 2990 3 13 0 +UnitTestCaseAction 1475846379546 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846379546 SpreadsheetTest.java FAIL +EditAction 1475846459005 Spreadsheet.java 2984 3 13 0 +RefactoringAction 1475846479228 SpreadsheetTest.java ADD void spreadsheet_evaluate_simple_equals_formula_int() METHOD +EditAction 1475846489983 SpreadsheetTest.java 2168 12 36 12 +UnitTestCaseAction 1475846491744 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846491745 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475846766881 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475846766882 SpreadsheetTest.java FAIL +EditAction 1475846889442 Spreadsheet.java 3031 3 15 0 +EditAction 1475846994120 Spreadsheet.java 3114 3 16 0 +CompilationAction 1475846994216 Spreadsheet.java +CompilationAction 1475847000913 Spreadsheet.java +UnitTestCaseAction 1475847002243 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847002243 SpreadsheetTest.java FAIL +EditAction 1475847071219 Spreadsheet.java 3097 3 16 0 +EditAction 1475847089038 Spreadsheet.java 3078 3 16 0 +UnitTestCaseAction 1475847103238 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847103239 SpreadsheetTest.java FAIL +EditAction 1475847133603 Spreadsheet.java 3096 3 16 0 +UnitTestCaseAction 1475847135054 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847135054 SpreadsheetTest.java FAIL +EditAction 1475847197778 Spreadsheet.java 3244 3 16 0 +EditAction 1475847206136 Spreadsheet.java 3256 3 16 0 +EditAction 1475847224592 Spreadsheet.java 3301 3 16 0 +EditAction 1475847239822 Spreadsheet.java 3349 3 16 0 +EditAction 1475847267678 Spreadsheet.java 3404 3 16 0 +EditAction 1475847284755 Spreadsheet.java 3396 3 16 0 +UnitTestCaseAction 1475847290395 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847290395 SpreadsheetTest.java FAIL +EditAction 1475847307208 Spreadsheet.java 3424 3 16 0 +EditAction 1475847329550 Spreadsheet.java 3430 3 16 0 +UnitTestCaseAction 1475847358792 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847358792 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847374274 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847374274 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847378299 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847378300 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847416436 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847416437 SpreadsheetTest.java FAIL +EditAction 1475847424609 Spreadsheet.java 3445 3 16 0 +UnitTestCaseAction 1475847425699 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847425699 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847431673 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847431674 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847437996 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847437996 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847456952 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847456953 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847464957 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847464957 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475847477443 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847477443 SpreadsheetTest.java FAIL +EditAction 1475847488657 Spreadsheet.java 3441 3 16 0 +UnitTestCaseAction 1475847489966 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847489967 SpreadsheetTest.java FAIL +EditAction 1475847513324 Spreadsheet.java 3461 3 16 0 +EditAction 1475847519747 Spreadsheet.java 3451 3 16 0 +UnitTestCaseAction 1475847521806 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847521806 SpreadsheetTest.java FAIL +EditAction 1475847555965 Spreadsheet.java 3472 3 16 0 +UnitTestCaseAction 1475847557261 SpreadsheetTest.java OK +UnitTestSessionAction 1475847557261 SpreadsheetTest.java OK +RefactoringAction 1475847849393 SpreadsheetTest.java ADD void spreadsheet_evaluate_ FIELD +RefactoringAction 1475847854404 SpreadsheetTest.java RENAME spreadsheet_evaluate_=>void spreadsheet_evaluate_cell_reference() METHOD +EditAction 1475847896200 SpreadsheetTest.java 2355 13 40 13 +UnitTestCaseAction 1475847918102 SpreadsheetTest.java OK +UnitTestSessionAction 1475847918102 SpreadsheetTest.java OK +EditAction 1475847938325 SpreadsheetTest.java 2357 13 40 13 +UnitTestCaseAction 1475847939754 SpreadsheetTest.java OK +UnitTestSessionAction 1475847939754 SpreadsheetTest.java OK +EditAction 1475847944780 SpreadsheetTest.java 2355 13 40 13 +EditAction 1475847954359 SpreadsheetTest.java 2355 13 40 13 +UnitTestCaseAction 1475847957910 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475847957910 SpreadsheetTest.java FAIL +EditAction 1475848023365 Spreadsheet.java 3693 3 16 0 +EditAction 1475848047958 Spreadsheet.java 3758 3 16 0 +EditAction 1475848055794 Spreadsheet.java 3772 3 16 0 +EditAction 1475848068828 Spreadsheet.java 3789 3 16 0 +UnitTestCaseAction 1475848070166 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475848070167 SpreadsheetTest.java FAIL +EditAction 1475848148445 Spreadsheet.java 3830 3 16 0 diff --git a/.besouro/20161007141352402/besouroEpisodes.txt b/.besouro/20161007141352402/besouroEpisodes.txt new file mode 100644 index 0000000..155adbc --- /dev/null +++ b/.besouro/20161007141352402/besouroEpisodes.txt @@ -0,0 +1,432 @@ +1475838842297 regression 1 9 true +1475839699452 test-first 3 835 true +1475839699453 test-first 3 835 true +1475839699454 test-first 3 835 true +1475839699455 test-first 3 835 true +1475839699456 test-first 3 835 true +1475839699457 test-first 3 835 true +1475839803004 test-addition 1 89 true +1475839852104 test-last 1 38 false +1475839852105 test-last 1 38 false +1475840176154 test-first 3 313 true +1475840176155 test-first 3 313 true +1475841488228 test-first 3 1260 true +1475841488229 test-first 3 1260 true +1475841488230 test-first 3 1260 true +1475841488231 test-first 3 1260 true +1475841488232 test-first 3 1260 true +1475841488233 test-first 3 1260 true +1475841488234 test-first 3 1260 true +1475841488235 test-first 3 1260 true +1475841488236 test-first 3 1260 true +1475841488237 test-first 3 1260 true +1475841488238 test-first 3 1260 true +1475841488239 test-first 3 1260 true +1475841488240 test-first 3 1260 true +1475841488241 test-first 3 1260 true +1475841488242 test-first 3 1260 true +1475841488243 test-first 3 1260 true +1475841488244 test-first 3 1260 true +1475841488245 test-first 3 1260 true +1475841488246 test-first 3 1260 true +1475841488247 test-first 3 1260 true +1475841488248 test-first 3 1260 true +1475841488249 test-first 3 1260 true +1475841488250 test-first 3 1260 true +1475841488251 test-first 3 1260 true +1475841488252 test-first 3 1260 true +1475841488253 test-first 3 1260 true +1475841488254 test-first 3 1260 true +1475841488255 test-first 3 1260 true +1475841488256 test-first 3 1260 true +1475841488257 test-first 3 1260 true +1475841488258 test-first 3 1260 true +1475841488259 test-first 3 1260 true +1475841488260 test-first 3 1260 true +1475841488261 test-first 3 1260 true +1475841488262 test-first 3 1260 true +1475841488263 test-first 3 1260 true +1475841488264 test-first 3 1260 true +1475841488265 test-first 3 1260 true +1475841488266 test-first 3 1260 true +1475841488267 test-first 3 1260 true +1475841488268 test-first 3 1260 true +1475841488269 test-first 3 1260 true +1475841488270 test-first 3 1260 true +1475841488271 test-first 3 1260 true +1475841488272 test-first 3 1260 true +1475841488273 test-first 3 1260 true +1475841488274 test-first 3 1260 true +1475841488275 test-first 3 1260 true +1475841488276 test-first 3 1260 true +1475841488277 test-first 3 1260 true +1475841488278 test-first 3 1260 true +1475841488279 test-first 3 1260 true +1475841488280 test-first 3 1260 true +1475841488281 test-first 3 1260 true +1475841488282 test-first 3 1260 true +1475841488283 test-first 3 1260 true +1475841488284 test-first 3 1260 true +1475841488285 test-first 3 1260 true +1475841488286 test-first 3 1260 true +1475841488287 test-first 3 1260 true +1475841488288 test-first 3 1260 true +1475841488289 test-first 3 1260 true +1475841488290 test-first 3 1260 true +1475841488291 test-first 3 1260 true +1475841488292 test-first 3 1260 true +1475841488293 test-first 3 1260 true +1475841488294 test-first 3 1260 true +1475841488295 test-first 3 1260 true +1475841488296 test-first 3 1260 true +1475841488297 test-first 3 1260 true +1475841488298 test-first 3 1260 true +1475841488299 test-first 3 1260 true +1475841488300 test-first 3 1260 true +1475841488301 test-first 3 1260 true +1475841488302 test-first 3 1260 true +1475841488303 test-first 3 1260 true +1475841488304 test-first 3 1260 true +1475841488305 test-first 3 1260 true +1475841488306 test-first 3 1260 true +1475841488307 test-first 3 1260 true +1475841488308 test-first 3 1260 true +1475841488309 test-first 3 1260 true +1475841615012 refactoring 2A 7 true +1475842997834 test-first 3 1323 true +1475842997835 test-last 1 1323 false +1475842997836 test-last 1 1323 false +1475842997837 test-last 1 1323 false +1475842997838 test-last 1 1323 false +1475842997839 test-last 1 1323 false +1475842997840 test-last 1 1323 false +1475842997841 test-last 1 1323 false +1475842997842 test-last 1 1323 false +1475842997843 test-last 1 1323 false +1475842997844 test-last 1 1323 false +1475842997845 test-last 1 1323 false +1475842997846 test-last 1 1323 false +1475842997847 test-first 3 1323 true +1475842997848 test-first 3 1323 true +1475842997849 test-first 3 1323 true +1475842997850 test-first 3 1323 true +1475842997851 test-first 3 1323 true +1475842997852 test-first 3 1323 true +1475842997853 test-first 3 1323 true +1475842997854 test-first 3 1323 true +1475842997855 test-first 3 1323 true +1475842997856 test-first 3 1323 true +1475842997857 test-first 3 1323 true +1475842997858 test-first 3 1323 true +1475842997859 test-first 3 1323 true +1475842997860 test-first 3 1323 true +1475842997861 test-first 3 1323 true +1475842997862 test-first 3 1323 true +1475842997863 test-first 3 1323 true +1475842997864 test-first 3 1323 true +1475842997865 test-first 3 1323 true +1475842997866 test-first 3 1323 true +1475842997867 test-first 3 1323 true +1475842997868 test-first 3 1323 true +1475842997869 test-first 3 1323 true +1475842997870 test-first 3 1323 true +1475842997871 test-first 3 1323 true +1475842997872 test-first 3 1323 true +1475842997873 test-first 3 1323 true +1475842997874 test-first 3 1323 true +1475842997875 test-first 3 1323 true +1475842997876 test-first 3 1323 true +1475842997877 test-first 3 1323 true +1475842997878 test-first 3 1323 true +1475842997879 test-first 3 1323 true +1475842997880 test-first 3 1323 true +1475842997881 test-first 3 1323 true +1475842997882 test-first 3 1323 true +1475842997883 test-first 3 1323 true +1475842997884 test-first 3 1323 true +1475842997885 test-first 3 1323 true +1475842997886 test-first 3 1323 true +1475842997887 test-first 3 1323 true +1475842997888 test-first 3 1323 true +1475842997889 test-first 3 1323 true +1475842997890 test-first 3 1323 true +1475842997891 test-first 3 1323 true +1475842997892 test-first 3 1323 true +1475842997893 test-first 3 1323 true +1475842997894 test-first 3 1323 true +1475842997895 test-first 3 1323 true +1475842997896 test-first 3 1323 true +1475842997897 test-first 3 1323 true +1475842997898 test-first 3 1323 true +1475842997899 test-first 3 1323 true +1475842997900 test-first 3 1323 true +1475842997901 test-first 3 1323 true +1475842997902 test-first 3 1323 true +1475842997903 test-first 3 1323 true +1475842997904 test-first 3 1323 true +1475842997905 test-first 3 1323 true +1475842997906 test-first 3 1323 true +1475842997907 test-first 3 1323 true +1475842997908 test-first 3 1323 true +1475842997909 test-first 3 1323 true +1475842997910 test-first 3 1323 true +1475842997911 test-first 3 1323 true +1475842997912 test-first 3 1323 true +1475842997913 test-first 3 1323 true +1475842997914 test-first 3 1323 true +1475842997915 test-first 3 1323 true +1475842997916 test-first 3 1323 true +1475842997917 test-first 3 1323 true +1475842997918 test-first 3 1323 true +1475842997919 test-first 3 1323 true +1475842997920 test-first 3 1323 true +1475842997921 test-first 3 1323 true +1475842997922 test-first 3 1323 true +1475842997923 test-first 3 1323 true +1475842997924 test-first 3 1323 true +1475842997925 test-first 3 1323 true +1475842997926 test-first 3 1323 true +1475842997927 test-first 3 1323 true +1475842997928 test-first 3 1323 true +1475842997929 test-first 3 1323 true +1475842997930 test-first 3 1323 true +1475842997931 test-first 3 1323 true +1475842997932 test-last 1 1323 false +1475842997933 test-first 3 1323 true +1475842997934 test-last 1 1323 false +1475842997935 test-first 3 1323 true +1475842997936 test-last 1 1323 false +1475842997937 test-first 3 1323 true +1475842997938 test-last 1 1323 false +1475842997939 test-first 3 1323 true +1475842997940 test-last 1 1323 false +1475842997941 test-first 3 1323 true +1475842997942 test-last 1 1323 false +1475842997943 test-first 3 1323 true +1475842997944 test-last 1 1323 false +1475842997945 test-first 3 1323 true +1475842997946 test-last 1 1323 false +1475842997947 test-first 3 1323 true +1475842997948 test-first 3 1323 true +1475842997949 test-last 1 1323 false +1475842997950 test-first 3 1323 true +1475842997951 test-last 1 1323 false +1475842997952 test-first 3 1323 true +1475842997953 test-last 1 1323 false +1475842997954 test-first 3 1323 true +1475842997955 test-last 1 1323 false +1475842997956 test-first 3 1323 true +1475842997957 test-first 3 1323 true +1475842997958 test-first 3 1323 true +1475842997959 test-first 3 1323 true +1475842997960 test-first 3 1323 true +1475842997961 test-first 3 1323 true +1475842997962 test-first 3 1323 true +1475842997963 test-first 3 1323 true +1475842997964 test-first 3 1323 true +1475842997965 test-first 3 1323 true +1475842997966 test-first 3 1323 true +1475842997967 test-first 3 1323 true +1475842997968 test-first 3 1323 true +1475842997969 test-first 3 1323 true +1475842997970 test-first 3 1323 true +1475842997971 test-first 3 1323 true +1475842997972 test-first 3 1323 true +1475842997973 test-first 3 1323 true +1475842997974 test-first 3 1323 true +1475842997975 test-first 3 1323 true +1475842997976 test-first 3 1323 true +1475842997977 test-first 3 1323 true +1475842997978 test-first 3 1323 true +1475842997979 test-first 3 1323 true +1475842997980 test-first 3 1323 true +1475842997981 test-first 3 1323 true +1475842997982 test-first 3 1323 true +1475842997983 test-first 3 1323 true +1475842997984 test-first 3 1323 true +1475842997985 test-first 3 1323 true +1475842997986 test-first 3 1323 true +1475842997987 test-first 3 1323 true +1475842997988 test-first 3 1323 true +1475842997989 test-first 3 1323 true +1475842997990 test-last 1 1323 false +1475842997991 test-last 1 1323 false +1475842997992 test-last 1 1323 false +1475842997993 test-last 1 1323 false +1475842997994 test-last 1 1323 false +1475842997995 test-last 1 1323 false +1475842997996 test-last 1 1323 false +1475842997997 test-last 1 1323 false +1475842997998 test-last 1 1323 false +1475842997999 test-last 1 1323 false +1475842998000 test-last 1 1323 false +1475842998001 test-last 1 1323 false +1475842998002 test-first 3 1323 true +1475842998003 test-first 3 1323 true +1475842998004 test-first 3 1323 true +1475842998005 test-first 3 1323 true +1475842998006 test-first 3 1323 true +1475842998007 test-first 3 1323 true +1475842998008 test-first 3 1323 true +1475842998009 test-first 3 1323 true +1475842998010 test-first 3 1323 true +1475842998011 test-first 3 1323 true +1475842998012 test-first 3 1323 true +1475842998013 test-first 3 1323 true +1475842998014 test-first 3 1323 true +1475842998015 test-first 3 1323 true +1475842998016 test-first 3 1323 true +1475842998017 test-first 3 1323 true +1475842998018 test-first 3 1323 true +1475842998019 test-first 3 1323 true +1475842998020 test-first 3 1323 true +1475842998021 test-first 3 1323 true +1475842998022 test-first 3 1323 true +1475842998023 test-first 3 1323 true +1475842998024 test-first 3 1323 true +1475842998025 test-first 3 1323 true +1475842998026 test-first 3 1323 true +1475842998027 test-first 3 1323 true +1475842998028 test-first 3 1323 true +1475842998029 test-first 3 1323 true +1475842998030 test-first 3 1323 true +1475842998031 test-first 3 1323 true +1475842998032 test-first 3 1323 true +1475842998033 test-first 3 1323 true +1475842998034 test-first 3 1323 true +1475842998035 test-first 3 1323 true +1475842998036 test-first 3 1323 true +1475842998037 test-first 3 1323 true +1475842998038 test-first 3 1323 true +1475842998039 test-first 3 1323 true +1475842998040 test-first 3 1323 true +1475842998041 test-first 3 1323 true +1475842998042 test-first 3 1323 true +1475842998043 test-first 3 1323 true +1475842998044 test-first 3 1323 true +1475842998045 test-first 3 1323 true +1475842998046 test-first 3 1323 true +1475842998047 test-first 3 1323 true +1475842998048 test-first 3 1323 true +1475842998049 test-first 3 1323 true +1475842998050 test-first 3 1323 true +1475842998051 test-first 3 1323 true +1475842998052 test-first 3 1323 true +1475842998053 test-first 3 1323 true +1475842998054 test-first 3 1323 true +1475842998055 test-first 3 1323 true +1475842998056 test-first 3 1323 true +1475842998057 test-first 3 1323 true +1475842998058 test-first 3 1323 true +1475842998059 test-first 3 1323 true +1475842998060 test-first 3 1323 true +1475842998061 test-first 3 1323 true +1475842998062 test-first 3 1323 true +1475842998063 test-first 3 1323 true +1475842998064 test-first 3 1323 true +1475842998065 test-first 3 1323 true +1475842998066 test-first 3 1323 true +1475842998067 test-first 3 1323 true +1475842998068 test-first 3 1323 true +1475842998069 test-first 3 1323 true +1475842998070 test-first 3 1323 true +1475842998071 test-first 3 1323 true +1475842998072 test-first 3 1323 true +1475842998073 test-first 3 1323 true +1475843052884 refactoring 2A 7 true +1475843108136 test-addition 1 43 true +1475845005501 test-first 3 1751 true +1475845005502 test-first 3 1751 true +1475845005503 test-first 3 1751 true +1475845005504 test-first 3 1751 true +1475845005505 test-first 3 1751 true +1475845005506 test-first 3 1751 true +1475845005507 test-first 3 1751 true +1475845005508 test-first 3 1751 true +1475845005509 test-first 3 1751 true +1475845005510 test-first 3 1751 true +1475845005511 test-first 3 1751 true +1475845005512 test-first 3 1751 true +1475845005513 test-first 3 1751 true +1475845005514 test-first 3 1751 true +1475845005515 test-first 3 1751 true +1475845005516 test-first 3 1751 true +1475845005517 test-first 3 1751 true +1475845005518 test-first 3 1751 true +1475845005519 test-first 3 1751 true +1475845005520 test-first 3 1751 true +1475845005521 test-first 3 1751 true +1475845005522 test-first 3 1751 true +1475845005523 test-first 3 1751 true +1475845005524 test-first 3 1751 true +1475845005525 test-first 3 1751 true +1475845005526 test-first 3 1751 true +1475845005527 test-first 3 1751 true +1475845005528 test-first 3 1751 true +1475845005529 test-first 3 1751 true +1475845005530 test-first 3 1751 true +1475845005531 test-first 3 1751 true +1475845005532 test-first 3 1751 true +1475845005533 test-first 3 1751 true +1475845005534 test-first 3 1751 true +1475845005535 test-first 3 1751 true +1475845005536 test-first 3 1751 true +1475845005537 test-first 3 1751 true +1475845005538 test-first 3 1751 true +1475845005539 test-first 3 1751 true +1475845005540 test-first 3 1751 true +1475845005541 test-first 3 1751 true +1475845005542 test-first 3 1751 true +1475845005543 test-first 3 1751 true +1475845005544 test-last 1 1751 false +1475845005545 test-last 1 1751 false +1475845005546 test-last 1 1751 false +1475845005547 test-last 1 1751 false +1475845005548 test-last 1 1751 false +1475845051003 test-addition 1 23 true +1475847557261 test-last 1 2496 false +1475847557262 test-last 1 2496 false +1475847557263 test-last 1 2496 false +1475847557264 test-last 1 2496 false +1475847557265 test-last 1 2496 false +1475847557266 test-last 1 2496 false +1475847557267 test-last 1 2496 false +1475847557268 test-last 1 2496 false +1475847557269 test-last 1 2496 false +1475847557270 test-last 1 2496 false +1475847557271 test-last 1 2496 false +1475847557272 test-last 1 2496 false +1475847557273 test-last 1 2496 false +1475847557274 test-last 1 2496 false +1475847557275 test-last 1 2496 false +1475847557276 test-last 1 2496 false +1475847557277 test-last 1 2496 false +1475847557278 test-last 1 2496 false +1475847557279 test-last 1 2496 false +1475847557280 test-last 1 2496 false +1475847557281 test-last 1 2496 false +1475847557282 test-last 1 2496 false +1475847557283 test-last 1 2496 false +1475847557284 test-last 1 2496 false +1475847557285 test-last 1 2496 false +1475847557286 test-last 1 2496 false +1475847557287 test-last 1 2496 false +1475847557288 test-last 1 2496 false +1475847557289 test-last 1 2496 false +1475847557290 test-last 1 2496 false +1475847557291 test-last 1 2496 false +1475847557292 test-last 1 2496 false +1475847557293 test-last 1 2496 false +1475847557294 test-last 1 2496 false +1475847557295 test-last 1 2496 false +1475847557296 test-last 1 2496 false +1475847557297 test-last 1 2496 false +1475847557298 test-last 1 2496 false +1475847557299 test-last 1 2496 false +1475847557300 test-last 1 2496 false +1475847557301 test-last 1 2496 false +1475847557302 test-last 1 2496 false +1475847557303 test-last 1 2496 false +1475847557304 test-last 1 2496 false +1475847918102 test-addition 1 68 true +1475847939754 regression 1 1 true diff --git a/.besouro/20161007141352402/disagreements.txt b/.besouro/20161007141352402/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007141352402/randomHeuristicEpisodes.txt b/.besouro/20161007141352402/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..b7e93fa --- /dev/null +++ b/.besouro/20161007141352402/randomHeuristicEpisodes.txt @@ -0,0 +1,15 @@ +1475838842297 regression 1 9 false +1475839699452 test-first 3 835 true +1475839803004 test-addition 1 89 false +1475839852104 test-last 1 38 false +1475840176154 test-first 3 313 true +1475841488228 test-first 3 1260 true +1475841615012 refactoring 2A 7 true +1475842997834 test-first 3 1323 true +1475843052884 refactoring 2A 7 false +1475843108136 test-addition 1 43 true +1475845005501 test-first 3 1751 true +1475845051003 test-addition 1 23 false +1475847557261 test-last 1 2496 false +1475847918102 test-addition 1 68 true +1475847939754 regression 1 1 true diff --git a/.besouro/20161007141352402/userComments.txt b/.besouro/20161007141352402/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161007141352402/zorroEpisodes.txt b/.besouro/20161007141352402/zorroEpisodes.txt new file mode 100644 index 0000000..2afef35 --- /dev/null +++ b/.besouro/20161007141352402/zorroEpisodes.txt @@ -0,0 +1,15 @@ +1475838842297 regression 1 9 true +1475839699452 test-first 3 857 true +1475839803004 test-addition 1 103 true +1475839852104 test-last 1 49 false +1475840176154 test-first 3 324 true +1475841488228 test-first 3 1312 true +1475841615012 refactoring 2A 126 true +1475842997834 test-first 3 1382 true +1475843052884 refactoring 2A 55 true +1475843108136 test-addition 1 55 true +1475845005501 test-first 3 1897 true +1475845051003 test-addition 1 45 true +1475847557261 test-last 1 2506 false +1475847918102 test-addition 1 360 false +1475847939754 regression 1 21 false 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/Spreadsheet.class b/bin/Spreadsheet.class index 92b411f..a4358ba 100644 Binary files a/bin/Spreadsheet.class and b/bin/Spreadsheet.class differ diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index e7086bd..2962403 100644 Binary files a/bin/SpreadsheetTest.class and b/bin/SpreadsheetTest.class differ diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e4f120b..0e34637 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,18 +1,407 @@ + +import java.util.*; + + +// Spaghetti code, exhibit A. public class Spreadsheet { + // member variables + // TODO: this needs to be cleared on every "new" evaluation. + private List lastCellNames = new ArrayList(); + + // flags for doing math. + boolean sumNext = false; + boolean subtractNext = false; + boolean multiplyNext = false; + boolean divideNext = false; + boolean moduloNext = false; + + // dictionary of cells and values. + // cell => key + // value => value + // --> + private Map map = new HashMap(); + public String get(String cell) { - // to be implemented - return null; + if(map.containsKey(cell)) { + return map.get(cell); + } + return "errormessage"; } public void set(String cell, String value) { - // to be implemented + map.put(cell, value); } public String evaluate(String cell) { - // to be implemented - return null; + + // cell's value in a string format. + String value = ""; + + // cell's value in a character array format. + char[] c; + + // flags for input types etc. + boolean isNegative = false; + boolean isString = false; + boolean containsEquals = false; + boolean usedMathFunctions = false; + + // Get the value of the cell. + // or if not found return error. + if(map.containsKey(cell)) { + value = map.get(cell); + } else { + return "ValueNotFoundError"; + } + + // convert string to character array. + c = value.toCharArray(); + + // this is a counter that counts digits in the value. + // TODO: this is really botched. Oh dear god (v_v) + int digitCount = 0; + + // this is the result if there are math functions in the cell. + int calculatedResult = 0; + + // For cutting the string to substring. + // Used to manipulate the value string in the return statements. + // TODO: start & end positions are smelly. + int startPos = 0; + int endPos = 0; + + // Loop through the value. + // TODO: + // 1. Maybe create sub-methods to clean "main" for-loop. + for(int i = 0; i < c.length; i++) { + + // SPECIAL CASES BEGIN: + + // if whole value is a string. + if(c[0] == '\'' && c[c.length - 1] == '\'') { + isString = true; + break; + } + + // if the first character is negative (-). + // only used when there are no equals sign. + if(c[i] == '-' && i == 0) { + isNegative = true; + continue; + } + + // SPECIAL CASES END. + + // If there is an equals character. + if(c[i] == '=') { + + // if there is nothing else than an equals sign. + // TODO: refactor, unused variable. + // -> wrap this around the rest of this block + // -> or use myChar instead of c[i+1] + try { + char myChar = c[i + 1]; + } catch (ArrayIndexOutOfBoundsException e) { + return "#Error"; + } + + containsEquals = true; + + // next character is negative sign. + if(c[i+1] == '-') { + startPos = i+1; + isNegative = true; + continue; + + // next character is opening single quote. + // -> there might be multiple concatenations or none. + } else if (c[i+1] == '\'') { + + int concatenationCount = 0; + + // Every other is starting point. + // Example: if there are 2 concatenations there should be three strings + // and therefore three different starting and ending points. + List startingAndEndingPoints = new ArrayList(); + + // Check if there are string concatenations. + for(int k = 0; k < c.length; k++) { + if(c[k] == '&') { + concatenationCount ++; + } + } + + // This if is here because we want to avoid breaking the code at this point. + // If there is no concatenations it means that it's just a single string. + // TODO: refactor this. + if(concatenationCount == 0) { + boolean hasClosingQuote = false; + startPos = i+2; + + // Loop through the remaining characters until closing quote is found or end of c. + for(int j = i+2; j < c.length; j++) { + + if(c[j] == '\'') { + hasClosingQuote = true; + endPos = j; + break; + } + } + + // Return value if the closing quote is found. + if(hasClosingQuote) { + return value.substring(startPos, endPos); + } else { + return "#Error"; + } + } else { + + // if there are two single quotes next to each other + // -> there should be '&' sign between them + // --> return error. + for(int j = 0; j < c.length - 1; j++) { + if(c[j] == '\'') { + if(c[j+1] == '\'') return "#Error"; + } + } + + // This is the first character in the string after opening single quote. + startingAndEndingPoints.add(i+2); + + boolean newString = false; + String resultString = ""; + + // Loop through the whole value of the cell and + // mark starting and ending points for each string. + for(int j = i+2; j < c.length; j++) { + + if(c[j] == '&') { + + // If there are odd number of quotes, + // -> means that this sign is inside a string. + // --> we want to jump over it. + // ---> it's not a new String yet. + if(startingAndEndingPoints.size() % 2 != 0) continue; + + newString = true; + continue; + } + + if(c[j] == '\'') { + if(newString) { + startingAndEndingPoints.add(j + 1); + newString = false; + } else { + startingAndEndingPoints.add(j); + } + } + } + + // There should always be even number of points. + if(startingAndEndingPoints.size() % 2 != 0) return "#Error"; + + // create a string from substrings. + for(int k = 0; k < startingAndEndingPoints.size(); k++) { + + // Only loop every second point, because we only want the start points. + // -> because the end point is the next point after the start point. + if(k % 2 != 0) continue; + + int startPoint = startingAndEndingPoints.get(k); + int endPoint = startingAndEndingPoints.get(k+1); + + resultString += value.substring(startPoint, endPoint); + } + + return resultString; + } + + // Next character is a digit. + // This means that there are probably going to be some math functions + // so we can put the value to calculatedResult just in case. + } else if(Character.isDigit(c[i+1])) { + calculatedResult = (c[i+1] - '0'); + startPos = i+1; + continue; + + // Next character is a letter. + // -> cell reference + // TODO: this might not mean it's a cell reference! + // Should we check if the letter is also upper case? + } else if(Character.isLetter(c[i+1])) { + + // Hard coded to take only TWO next characters as + // cell reference. If there are not two then return error. + + // TODO: for loop so long that there is either space or + // some special character like +, -, /, %, etc. + + char scnd = c[i+1]; + char thrd = ' '; + + // check if there is third character. + // example: "=A5" + // --> 1. '=' + // --> 2. 'A' + // --> 3. '5' + try { + thrd = c[i+2]; + } catch (ArrayIndexOutOfBoundsException e) { + return "#Error"; + } + + // create our cell name as a string. + // -> "=A5" + // --> cellName == A5 + String cellName = "" + scnd + thrd; + + // If the last cell's name is the same as the target of this next cell. + // -> circulating. + if(lastCellNames.contains(cellName)) { + return "#Circular"; + } + + // Set the lastCellName to the cell that we evaluated. + lastCellNames.add(cell); + + return this.evaluate(cellName); + + } else { + // in other case just return error. + return "#Error"; + } + } + + // Check for math functions + // if one is found then flip it's flag to true. + switch(c[i]) { + case '+': + sumNext = true; + usedMathFunctions = true; + break; + + case '-': + subtractNext = true; + usedMathFunctions = true; + break; + + case '/': + divideNext = true; + usedMathFunctions = true; + break; + + case '*': + multiplyNext = true; + usedMathFunctions = true; + break; + + case '%': + moduloNext = true; + usedMathFunctions = true; + break; + } + + // if the character is a digit. + if(Character.isDigit(c[i])) { + + // if the preceding character was a math function + // then calculate and reset the math flags. + if(sumNext) { + calculatedResult += (c[i] - '0'); + ResetMathFlags(); + } else if(subtractNext) { + calculatedResult -= (c[i] - '0'); + ResetMathFlags(); + } else if(divideNext) { + try { + calculatedResult /= (c[i] - '0'); + ResetMathFlags(); + } catch(ArithmeticException e) { + return "#Error"; + } + } else if(multiplyNext) { + calculatedResult *= (c[i] - '0'); + ResetMathFlags(); + } else if(moduloNext) { + try { + calculatedResult %= (c[i] - '0'); + ResetMathFlags(); + } catch(ArithmeticException e) { + return "#Error"; + } + } else { + // nothing to see here. (o_o) + } + digitCount ++; + + // if character is letter. + } else if(Character.isLetter(c[i])) { + + // if we have already used math functions + // we don't allow letters. + if(usedMathFunctions) { + return "#Error"; + } + } + } + + // if we did some sort of math calculations, just return the result. + // example: cell had "=1+1" + // so we raised usedMathFunctions, because we noticed the '+' sign. + if(usedMathFunctions) { + return "" + calculatedResult; + } + + // if the WHOLE input value is a string. + // return a substring without single quotes. + if(isString) { + return value.substring(1, value.length() - 1); + } + + // if there are some other characters than digits. + // 1. Check if the number is negative + // 2. if the string contains other characters than digits and '-'. + if(isNegative || containsEquals) { + + // "remove" two from value length + // 1. negative sign + // 2. equals sign + if(isNegative && containsEquals) { + if(digitCount != c.length - 2) { + return "#Error"; + } else { + return value.substring(startPos); + } + } + + // "remove" one from value length + // 1. negative sign + if(digitCount != (c.length - 1)) { + return "#Error"; + } else { + return value.substring(startPos); + } + + } else { + + if(digitCount != c.length) { + return "#Error"; + } else { + return value; + } + + } + } + + private void ResetMathFlags() { + sumNext = false; + subtractNext = false; + multiplyNext = false; + divideNext = false; + moduloNext = false; } + } diff --git a/tests/SpreadsheetTest.java b/tests/SpreadsheetTest.java index 9e0936a..cdb7f8b 100644 --- a/tests/SpreadsheetTest.java +++ b/tests/SpreadsheetTest.java @@ -5,11 +5,258 @@ public class SpreadsheetTest { - + @Test - public void test() { - fail("Not yet implemented"); - + public void spreadsheet_notnull() { + Spreadsheet ss = new Spreadsheet(); + assertNotNull(ss); } + @Test + public void spreadsheet_set_a1_1() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "1"); + String result = ss.get("A1"); + assertEquals("1", result); + } + @Test + public void spreadsheet_get_error() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "2"); + assertEquals("errormessage", ss.get("A2")); + } + + @Test + public void spreadsheet_get_ValueNotFoundError() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "2"); + assertEquals("ValueNotFoundError", ss.evaluate("A2")); + } + + @Test + public void spreadsheet_evaluate_negative() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "-1"); + assertEquals("-1", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_wronglyFormattedInt() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "5A"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_a1_teststring() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "'teststring'"); + assertEquals("teststring", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_incorrect_string() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "'teststring"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_simple_equals_formula_string() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='teststring'"); + assertEquals("teststring", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_simple_equals_formula_string_error() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='teststring"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_simple_equals_formula_negative_int() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=-5"); + assertEquals("-5", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_simple_equals_formula_int() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=5"); + assertEquals("5", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_equals_error() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "="); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_incorrect_cell_reference() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A5", "5"); + ss.set("A1", "=A"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_cell_reference() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A5", "5"); + ss.set("A1", "=A5"); + assertEquals("5", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_multiple_cell_references() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A5", "10"); + ss.set("A1", "=A5"); + ss.set("A2", "=A1"); + assertEquals("10", ss.evaluate("A2")); + } + + @Test + public void spreadsheet_evaluate_multiple_cell_references_string() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A5", "'test'"); + ss.set("A1", "=A5"); + ss.set("A2", "=A1"); + assertEquals("test", ss.evaluate("A2")); + } + + @Test + public void spreadsheet_evaluate_circular_error() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=A2"); + ss.set("A2", "=A1"); + assertEquals("#Circular", ss.evaluate("A2")); + } + + @Test + public void spreadsheet_evaluate_multiple_cell_circular_error() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=A2"); + ss.set("A2", "=A3"); + ss.set("A3", "=A1"); + assertEquals("#Circular", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_integer_operation_plus() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1+1"); + assertEquals("2", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_math_operation_plus_multiply() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1+1*2"); + assertEquals("4", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_math_operation_division() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=2/2"); + assertEquals("1", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_math_operation_modulo() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=6%5"); + assertEquals("1", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_math_division_by_zero() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1/0"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_math_modulo_by_zero() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1%0"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_cell_reference_math_function() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1+1"); + ss.set("A2", "=A1"); + assertEquals("2", ss.evaluate("A2")); + } + + @Test + public void spreadsheet_evaluate_math_operation_plus_incorrect_input() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "=1+1A"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_one() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='awesome'&'sauce'"); + assertEquals("awesomesauce", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_two() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='best'&'awesome'&'sauce'"); + assertEquals("bestawesomesauce", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_three() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms'&'best'&'awesome'&'sauce'"); + assertEquals("momsbestawesomesauce", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_four() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms'&'best'&'awesome'&'hot'&'sauce'"); + assertEquals("momsbestawesomehotsauce", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_no_sign() { // this doesn't even use the concatenation code block. + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms''spaghetti'"); + assertEquals("moms", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_incorrect_sign_placement() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms&''spaghetti'"); + assertEquals("#Error", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_signs_in_strings() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms&'&'spaghetti'"); + assertEquals("moms&spaghetti", ss.evaluate("A1")); + } + + @Test + public void spreadsheet_evaluate_string_concatenation_odd_number_quotes() { + Spreadsheet ss = new Spreadsheet(); + ss.set("A1", "='moms'&best'"); + assertEquals("#Error", ss.evaluate("A1")); + } }