Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added new file and test for negative parse of empty file

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

0 comments on commit a37080c

Please sign in to comment.
Something went wrong with that request. Please try again.