From a6470424db82a95e8c9037231d6c9b298895d5a7 Mon Sep 17 00:00:00 2001 From: Dimitry Volker Date: Tue, 21 Mar 2017 13:35:48 +0100 Subject: [PATCH 1/2] added pherentesis feature --- numerals/Main.class | Bin 395 -> 403 bytes numerals/features/numerals_dimitry.feature | 19 +++++++++++------- .../features/step_definitions/numerals.rb | 2 -- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/numerals/Main.class b/numerals/Main.class index d780fcf3f5087b6af57320f0194d4cb8414c8262..e8443cb879ec6a1da464d26c02a5e9b85e830a09 100644 GIT binary patch delta 185 zcmYL>I}XA?3`E~%6E<1GFMI<;NJuo)+z6#b;tq6F5#k_FfJDIoI22-%1{dS8{l;f| zvFp$G^#*nno)*1?K7*LdGi2l#J0{g?pF3j5G-XC^uw{90%u^ODtLy0)DOgv4L7+6z tRHz&EX#2$6WDH)~YL+$9CY7(zO%sLWPLSCL;UD)pL8z~h;EsGi_Xma{54->X delta 177 zcmYL>I}XAy5Cz9^91|11;g1j!1w~3Y5;x!sbW{;NcYp#U3J$=b5YK7Y;_d9yXfO6` z*Prj}4eVJ49NnBA{lI{sr}T{K&7sWjo^ip1sb^L&XHj2I$5eit1cMZ1OV>) Date: Tue, 21 Mar 2017 14:35:12 +0100 Subject: [PATCH 2/2] Done --- numerals/.DS_Store | Bin 0 -> 6148 bytes numerals/Gemfile | 5 --- numerals/Main.java | 36 +++++++++++++++--- numerals/features/.DS_Store | Bin 0 -> 6148 bytes numerals/features/aukebakker.feature | 11 ------ numerals/features/binary.feature | 27 ------------- numerals/features/daniel-multiply.feature | 11 ------ numerals/features/joopvriezen.feature | 12 ------ numerals/features/koen.feature | 10 ----- numerals/features/numerals.feature | 6 --- .../features/numerals_0-10-square.feature | 17 --------- numerals/features/numerals_0-20.feature | 27 ------------- numerals/features/numerals_base.feature | 6 --- numerals/features/numerals_dimitry.feature | 16 -------- numerals/features/numerals_divide.feature | 11 ------ numerals/features/numerals_hex.feature | 27 ------------- numerals/features/numerals_morse.feature | 11 ------ numerals/features/numerals_plus.feature | 16 -------- numerals/features/numerals_rikk.feature | 11 ------ numerals/features/numerals_roman.feature | 14 ------- .../features/numerals_russian_BjornC.feature | 28 -------------- numerals/features/numerals_spanish.feature | 15 -------- numerals/features/sander.feature | 22 ----------- .../features/step_definitions/numerals.rb | 2 +- 24 files changed, 32 insertions(+), 309 deletions(-) create mode 100644 numerals/.DS_Store create mode 100644 numerals/features/.DS_Store delete mode 100644 numerals/features/aukebakker.feature delete mode 100644 numerals/features/binary.feature delete mode 100644 numerals/features/daniel-multiply.feature delete mode 100644 numerals/features/joopvriezen.feature delete mode 100644 numerals/features/koen.feature delete mode 100644 numerals/features/numerals.feature delete mode 100644 numerals/features/numerals_0-10-square.feature delete mode 100644 numerals/features/numerals_0-20.feature delete mode 100644 numerals/features/numerals_base.feature delete mode 100644 numerals/features/numerals_dimitry.feature delete mode 100644 numerals/features/numerals_divide.feature delete mode 100644 numerals/features/numerals_hex.feature delete mode 100644 numerals/features/numerals_morse.feature delete mode 100644 numerals/features/numerals_plus.feature delete mode 100644 numerals/features/numerals_rikk.feature delete mode 100644 numerals/features/numerals_roman.feature delete mode 100644 numerals/features/numerals_russian_BjornC.feature delete mode 100644 numerals/features/numerals_spanish.feature delete mode 100644 numerals/features/sander.feature diff --git a/numerals/.DS_Store b/numerals/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..890ce1acaac0f9176df8090074750a7e7303b3b7 GIT binary patch literal 6148 zcmeHKJ8r^25S<||EYVP=+$(T{6(T3#0z^tegB;0;Q@i3^9E~?0A&{X#qKV!}GjDfx z-dcWz$0H)T8a|dH3lVAIhH|hlH9I$-*eo*&gyW7udij)}zfIpws&6NZ+sYSM@A7-e z-+yvUr~nn90#x831+4eN+Ib)&6`%rC;H-ds9}3*CCXRvr=|J!i0N5by zhPBTUz+wqtO&kM}foV{ILDd{FH0a2etgDG*V9-T#_|SZ^=7ggDblhLOT(kxmDrVEV!GD;Pr_35;7zFLL8b1pRTt`}bhj2=EBhPzM}C37 z<4ls4mMWeUl^K}4$z&#JUP@*I0HQevYXB|)IH-h$GBzIwjg!tv!FmXVo}&#Rbl?gi zi07i&@f#VSvvVPV6wj>()8`kVF9L-pnFPb67j#vCv9Cd|8zpJA`X&m+(!%1BQ!YE@ z73ZRLqlT^2PX|fU@1N;j6m|k@A1l?J*nV&lb%t$sZBNCiAH|*iRQUO66o+cqRD(E7 z^gKs?dV{%op|-n`W%cbwMb_)JQAK8rMztch>N}&6m;q+s4>Mq|G-vq_?}2|hGr$ad4+C^RNK``4 zVs21h9oW$4BaN2`NzkUZ1fjI(StD|4)a1fqBZkYjQV3vWR>AF<^4?chY&n9t?8DIwf6$7HQ-`a2DmTYaE+Z@$e tiF%1jLUFmlNeUXe6k{xv;tf -Then the output should be - - Examples: - | number | binary | - | 1 | 1 | - | 2 | 10 | - | 3 | 11 | - | 4 | 100 | - | 5 | 101 | - | 6 | 110 | - | 7 | 111 | - | 8 | 1000 | - | 9 | 1001 | - |10 | 1010 | - |11 | 1011 | - |12 | 1100 | - |13 | 1101 | - |14 | 1110 | - |15 | 1111 | - |16 | 10000 | - |17 | 10001 | - |18 | 10010 | - |19 | 10011 | - |20 | 10100 | \ No newline at end of file diff --git a/numerals/features/daniel-multiply.feature b/numerals/features/daniel-multiply.feature deleted file mode 100644 index 1a6f524..0000000 --- a/numerals/features/daniel-multiply.feature +++ /dev/null @@ -1,11 +0,0 @@ -Feature: Numerals should be multipliable. - -Scenario: Show the multiplication of two numbers. -Given the input "2*2" -When the converter is run -Then the output should be "vier" - -Scenario: Show that the multiplication of two numbers is transitive. -Given the input "2*2*2" -When the converter is run -Then the output should be "8" \ No newline at end of file diff --git a/numerals/features/joopvriezen.feature b/numerals/features/joopvriezen.feature deleted file mode 100644 index f73b47f..0000000 --- a/numerals/features/joopvriezen.feature +++ /dev/null @@ -1,12 +0,0 @@ -Feature: Adding numbers - - Scenario: Add up two numbers. - Given the input "15" - When 10 is added - Then the output should be "twentyfive" - - Scenario: Show that adding multiple times also works - Given the input "10" - When 20 is added - And 20 is added again - Then the output should be "fifty" \ No newline at end of file diff --git a/numerals/features/koen.feature b/numerals/features/koen.feature deleted file mode 100644 index a496bdb..0000000 --- a/numerals/features/koen.feature +++ /dev/null @@ -1,10 +0,0 @@ -Feature: Square root - Scenario: square root 25 - Given the input "sqrt(25)" - When the calculator is run - Then the output should be "5" - - Scenario: square root 100 - Given the input "sqrt(100)" - When the calculator is run - Then the output should be "10" \ No newline at end of file diff --git a/numerals/features/numerals.feature b/numerals/features/numerals.feature deleted file mode 100644 index d7131f8..0000000 --- a/numerals/features/numerals.feature +++ /dev/null @@ -1,6 +0,0 @@ -Feature: Numerals should be converted to written form. - -Scenario: Display number 4 in written form ("vier"). -Given the input "4" -When the converter is run -Then the output should be "vier" diff --git a/numerals/features/numerals_0-10-square.feature b/numerals/features/numerals_0-10-square.feature deleted file mode 100644 index ee4afa8..0000000 --- a/numerals/features/numerals_0-10-square.feature +++ /dev/null @@ -1,17 +0,0 @@ -Feature: numerals 1-10 should be squared. -Scenario Outline: Display square of numbers 1-10 as words -When the input is -Then the output should be - - Examples: - | number | word | - | 1 |"een" | - | 2 |"vier" | - | 3 |"negen" | - | 4 |"zestien" | - | 5 |"vijfentwintig" | - | 6 |"zesendertig" | - | 7 |"negenenveertig" | - | 8 |"vierenzestig" | - | 9 |"eenentachtig" | - |10 |"honderd" | diff --git a/numerals/features/numerals_0-20.feature b/numerals/features/numerals_0-20.feature deleted file mode 100644 index d3ad1b4..0000000 --- a/numerals/features/numerals_0-20.feature +++ /dev/null @@ -1,27 +0,0 @@ -Feature: numerals 1-20 should be translated. -Scenario Outline: Display uncomplicated numbers as words -When the input is -Then the output should be - - Examples: - | number | word | - | 1 |"een" | - | 2 |"twee" | - | 3 |"drie" | - | 4 |"vier" | - | 5 |"vijf" | - | 6 |"zes" | - | 7 |"zeven" | - | 8 |"acht" | - | 9 |"negen" | - |10 |"tien" | - |11 |"elf" | - |12 |"twaalf" | - |13 |"dertien" | - |14 |"veertien" | - |15 |"vijftien" | - |16 |"zestien" | - |17 |"zeventien"| - |18 |"achttien" | - |19 |"negentien" | - |20 | "twintig" | \ No newline at end of file diff --git a/numerals/features/numerals_base.feature b/numerals/features/numerals_base.feature deleted file mode 100644 index b697ae4..0000000 --- a/numerals/features/numerals_base.feature +++ /dev/null @@ -1,6 +0,0 @@ -Feature: Numerals should be converted to written form. - -Scenario: Display number 1 in written form ("een"). -Given the input "1" -When the converter is run -Then the output should be "een" diff --git a/numerals/features/numerals_dimitry.feature b/numerals/features/numerals_dimitry.feature deleted file mode 100644 index 29f4807..0000000 --- a/numerals/features/numerals_dimitry.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Calculator must have parentheses feature. - - Scenario: Show correct result with the use of parentheses. - Given the input "2*(2+1)" - When the converter is run - Then the output should be "zes" - - Scenario: Show doesn't matter where parentheses are used. - Given the input "(3+1)*3" - When the converter is run - Then the output should be "twaalf" - - Scenario: Show working of more than one pair parentheses are used. - Given the input "(3+(1*2))*3" - When the converter is run - Then the output should be "vijftien" diff --git a/numerals/features/numerals_divide.feature b/numerals/features/numerals_divide.feature deleted file mode 100644 index adfa336..0000000 --- a/numerals/features/numerals_divide.feature +++ /dev/null @@ -1,11 +0,0 @@ -Feature: Numerals should be dividable. - -Scenario: Show the division of two numbers. -Given the input "4/2" -When the converter is run -Then the output should be "2" - -Scenario: Show that the division of two numbers is transitive. -Given the input "100/5/4" -When the converter is run -Then the output should be "5" diff --git a/numerals/features/numerals_hex.feature b/numerals/features/numerals_hex.feature deleted file mode 100644 index 7da804b..0000000 --- a/numerals/features/numerals_hex.feature +++ /dev/null @@ -1,27 +0,0 @@ -Feature: numerals 1-20 should be translated. -Scenario Outline: Display uncomplicated numbers as hexadecimal characters -When the input is -Then the output should be - - Examples: - | number | hex | - |20 |"14" | - |21 |"15" | - |22 |"16" | - |23 |"17" | - |24 |"18" | - |25 |"19" | - |26 |"1A" | - |27 |"1B" | - |28 |"1C" | - |29 |"1D" | - |30 |"1E" | - |31 |"1F" | - |32 |"20" | - |33 |"21" | - |34 |"22" | - |35 |"23" | - |36 |"24"| - |37 |"25" | - |38 |"26" | - |39 | "27" | diff --git a/numerals/features/numerals_morse.feature b/numerals/features/numerals_morse.feature deleted file mode 100644 index 9b0c0f0..0000000 --- a/numerals/features/numerals_morse.feature +++ /dev/null @@ -1,11 +0,0 @@ -Feature: Numerals should be convertable to morse. - -Scenario: Display number 1 in morse (".----") -Given the input "1" -When the converter is run -Then the output should be ".----" - -Scenario: Display number 204 in morse ("..--- ----- ....-") -Given the input "204" -When the converter is run -Then the output should be "..--- ----- ....-") \ No newline at end of file diff --git a/numerals/features/numerals_plus.feature b/numerals/features/numerals_plus.feature deleted file mode 100644 index 0ec20e0..0000000 --- a/numerals/features/numerals_plus.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Numerals should be summable. - -Scenario: Show the sum of two numbers. -Given the input "1+1" -When the converter is run -Then the output should be "twee" - -Scenario: Show the power of a number -Given the input "2" -When the converter is run -Then the output should be "4" - -Scenario: Show that the sum of two numbers is transitive. -Given the input "1+1+1" -When the converter is run -Then the output should be "three" diff --git a/numerals/features/numerals_rikk.feature b/numerals/features/numerals_rikk.feature deleted file mode 100644 index 430506e..0000000 --- a/numerals/features/numerals_rikk.feature +++ /dev/null @@ -1,11 +0,0 @@ -Feature: log. - - Scenario: Show the result of log(100). - Given the input "log(100)" - When the converter is run - Then the output should be "2" - - Scenario: Show the result of log(1000). - Given the input "log(1000)" - When the converter is run - Then the output should be "3" diff --git a/numerals/features/numerals_roman.feature b/numerals/features/numerals_roman.feature deleted file mode 100644 index ccd269f..0000000 --- a/numerals/features/numerals_roman.feature +++ /dev/null @@ -1,14 +0,0 @@ -Feature: numerals 1,5,10,50,100,500,1000 should be converted to Roman numerals -Scenario Outline: Display numerals as Roman numerals -When the input is -Then the output should be - - Examples: - | number | letter | - | 1 | "I" | - | 5 | "V" | - | 10 | "X" | - | 50 | "L" | - | 100 | "C" | - | 500 | "D" | - | 1000 | "M" | diff --git a/numerals/features/numerals_russian_BjornC.feature b/numerals/features/numerals_russian_BjornC.feature deleted file mode 100644 index e01ab13..0000000 --- a/numerals/features/numerals_russian_BjornC.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: Numerals 1-20 should be translated to Russian (phonetically) - -Scenario Outline: Display uncomplicated numbers as words. - When the input is - Then the output should be - - Examples: - | number | word | - | 1 |"adin"| - | 2 |"dva" | - | 3 |"tri" | - | 4 |"tsjetihri" | - | 5 |"pjat" | - | 6 |"sjest" | - | 7 |"sem" | - | 8 |"vosim" | - | 9 |"devjat" | - |10 |"desjat" | - |11 |"adinatsat" | - |12 |"dvanatsat" | - |13 |"trinatsat" | - |14 |"tsjetihrnatsat" | - |15 |"pjatnatsat" | - |16 |"sjestnatsat" | - |17 |"semnatsat" | - |18 |"vosimnatsat" | - |19 |"devjatnatsat" | - |20 | "dvatsat" | \ No newline at end of file diff --git a/numerals/features/numerals_spanish.feature b/numerals/features/numerals_spanish.feature deleted file mode 100644 index 25c2488..0000000 --- a/numerals/features/numerals_spanish.feature +++ /dev/null @@ -1,15 +0,0 @@ -Feature: Numerals 1-8 should be translated to Spanish. -Scenario Outline: Display uncomplicated numbers as words -When the input is -Then the output should be - - Examples: - | number | word | - | 1 |"uno" | - | 2 |"dos" | - | 3 |"tres" | - | 4 |"cuatro" | - | 5 |"cinco" | - | 6 |"seis" | - | 7 |"siete" | - | 8 |"ocho" | \ No newline at end of file diff --git a/numerals/features/sander.feature b/numerals/features/sander.feature deleted file mode 100644 index 5632141..0000000 --- a/numerals/features/sander.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: numerals 1-15 should be translated to character. - Scenario Outline: Display uncomplicated numbers as characters - When the input is - Then the output should be - - Examples: - | number | character | - | 1 |"!" | - | 2 |"@" | - | 3 |"#" | - | 4 |"$" | - | 5 |"%" | - | 6 |"^" | - | 7 |"&" | - | 8 |"*" | - | 9 |"(" | - | 10 |"($(@" | - | 11 |"*$*#" | - | 12 |"^^^##@" | - | 13 |"(%*#)@)$&"| - | 14 |":)" | - | 15 |":(" | \ No newline at end of file diff --git a/numerals/features/step_definitions/numerals.rb b/numerals/features/step_definitions/numerals.rb index 41a60d8..f3635de 100644 --- a/numerals/features/step_definitions/numerals.rb +++ b/numerals/features/step_definitions/numerals.rb @@ -3,7 +3,7 @@ end When(/^the converter is run$/) do - @output = `javac Main.java && java Main {@input}` + @output = `javac Main.java && java Main #{@input}` raise('Command failed!') unless $?.success? end