anchor.diff:  %%% @end
   %%% Created :  8 Jan 2014 by Laura M. Castro <lcastro@udc.es>
   %%%-------------------------------------------------------------------
  +
   -module(readspec).
   
   -export([suite/3, counterexample/1]).
  
positive.code: 	{ok, _CoverFile} = cover:analyse_to_file(Model), %%% [removable up to here]
  %	{ok, _CoverFile} = smother:analyse_to_file(Model), %%% [removable up to here]
  	?DEBUG("Cucumberising set of test cases~n", []),
  	ok = file:write_file("suite.cucumberl", io_lib:fwrite("~p~n", [cucumberise_suite(eqc_suite:cases(Suite))])).
  
  counterexample(Counterexample) ->
  	cucumberise_teststeps_aux(Counterexample, []).
  
  %%% ------------------------------------------------- %%%
  
  cucumberise_suite(Suite) ->
  	cucumberise_testcases_aux(Suite, []).
  
  cucumberise_testcases_aux([], CucumberisedTestCases) ->
  	CucumberisedTestCases;
  cucumberise_testcases_aux([TestCase | MoreTestCases], CucumberisedTestCases) ->
  	cucumberise_testcases_aux(MoreTestCases, [cucumberise_teststeps(TestCase) | CucumberisedTestCases]).
  
  cucumberise_teststeps([TestCase]) ->
  	cucumberise_teststeps_aux(TestCase, []);
  
negative.code: 	cucumberise_teststeps_aux(TestCase, []).
  
  cucumberise_teststeps_aux([], CucumberisedTestSteps) ->
  	lists:flatten(cucumberise({scenario, lists:reverse(CucumberisedTestSteps)}));
  % tests for QC properties
  cucumberise_teststeps_aux(Values, []) when is_tuple(Values) ->
  	cucumberise({scenario, Values});
  