Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added new file and test for negative parse of empty file

ros_parser
  • Loading branch information...
commit a37080c65f1f096759f00f13a1558fccd646d782 1 parent eb2a688
Gianfranco Alongi authored
View
3  One/Solution/Makefile
@@ -4,4 +4,5 @@ all:
.PHONY: test
test:
- erl -pa ebin/ -eval 'eunit:test(ros_reader,[verbose]),init:stop().'
+ erl -pa ebin/ -eval 'eunit:test(ros_reader,[verbose]),\
+ eunit:test(ros_parser,[verbose]),init:stop().'
View
7 One/Solution/src/ros_parser.erl
@@ -0,0 +1,7 @@
+-module(ros_parser).
+-export([parse/1]).
+
+-spec(parse(string()) -> {error,no_total}).
+parse("")-> {error,no_total}.
+
+
View
6 One/Solution/test/ros_parser_tests.erl
@@ -0,0 +1,6 @@
+-module(ros_parser_tests).
+-include_lib("eunit/include/eunit.hrl").
+
+ros_parse_empty_test() ->
+ Input = "",
+ ?assertMatch({error,no_total},ros_parser:parse(Input)).
Please sign in to comment.
Something went wrong with that request. Please try again.