Skip to content

JeffHoover/roman-numeral-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Roman Numeral Calculator Kata

https://drive.google.com/a/pillartechnology.com/file/d/0Bz26C0WuteyRSG1yY1g2ZTNKVmM/view?usp=sharing

Additionally, I use valgrind http://valgrind.org/ to detect subtle errors with memory management etc and 'indent' (sudo apt-get install indent) to clean up source files using -linux and -i4 args.

Information on Tests:

The file ./tests/test_roman_numbers.c has four test cases in a single test suite "Roman Numeral Unit Tests": "RomanToArabic" "ArabicToRoman” “Addition” “Subtraction”

Each test case covers all the test data for that operation and writes results to the console. An example of each type of output is:

convert_roman_to_arabic(I) = 1 convert_arabic_to_roman(1) = I I + I = II IV - I = III

Using ansi color escape sequences, passing output is shown in green and failing output is shown in red.

#Usage:

cd src

make

Most Useful Make Targets:

  • all (cleans all binaries, builds implementation and tests, runs tests including valgrind)

  • check (runs tests including valgrind)

Other Make Targets:

  • clean (cleans all binaries)

  • test (builds tests)

  • roman (builds the implementation)

#If I wanted to spend more time, I would address:

  • I'd package the implementation in a library (.a file) and provide a minimal .h file.

About

Jeff Hoover's Roman Numeral Kata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published