Permalink
Browse files

Added makefile with test target for ros_reader

Added the first test and code for ros_reader
Updated .gitignore to ignore beam files
  • Loading branch information...
1 parent 19da81d commit c3b06208cc840338c947c453c3ff4b48fac31341 Gianfranco Alongi committed Feb 19, 2012
View
1 .gitignore
@@ -1,2 +1,3 @@
+*.beam
*~
#*#
View
7 One/Solution/Makefile
@@ -0,0 +1,7 @@
+all:
+ erlc -o ebin/ src/*.erl test/*.erl
+
+.PHONY: test
+
+test:
+ erl -pa ebin/ -eval 'eunit:test(ros_reader,[verbose]).'
View
7 One/Solution/src/ros_reader.erl
@@ -0,0 +1,7 @@
+-module(ros_reader).
+-export([read_file/1]).
+
+-spec(read_file(string()) -> {ok,term()}).
+read_file(File) ->
+ file:read_file(File).
+
View
0 One/Solution/test/january-good-2011.ros
No changes.
View
7 One/Solution/test/ros_reader_tests.erl
@@ -0,0 +1,7 @@
+-module(ros_reader_tests).
+-include_lib("eunit/include/eunit.hrl").
+
+ros_reads_file_test() ->
+ File = "./test/january-good-2011.ros",
+ ?assertMatch({ok,Result},ros_reader:read_file(File)).
+

0 comments on commit c3b0620

Please sign in to comment.