anchor.diff:  
   
   % Helper functions
  -test_start( ) ->
  -	{ ok, Pid } = start( ),
  -	meck:new( lurch_driver_port, [ ] ),
  -	meck:expect( lurch_driver_port, start_driver,
  -				 fun( _Driver, _Parameters ) -> { ok, port_mock } end ),
  -	meck:expect( lurch_driver_port, stop_driver,
  -				 fun( Port ) -> ok end ),
  -	Pid.
  -
  -
  -test_stop( Pid ) ->
  -	meck:unload( lurch_driver_port ),
  -	stop( Pid ).
  -
  -
   test_poll_device_event( Pid ) ->
   	{ ok, DeviceId } = start_device( Pid, dummy_driver_config( ) ),
   	InvalidDeviceId = make_ref(),
  
positive.code: 
  device_list_test_( ) ->
  	{ "add and list devices"
  	, ?setup( fun test_add_list_devices/1 ) }.
  
  
  device_poll_event_test_( ) ->
  	{ "poll events"
  	, ?setup( fun test_poll_device_event/1 ) }.
  
  
  % Actual tests
  
negative.code: -ifdef( TEST ).
  -include_lib( "eunit/include/eunit.hrl" ).
  
  -define( setup( F ), { setup, fun test_start/0, fun test_stop/1, fun F/1 } ).
  
  -define( DRIVER_NAME, <<"dummy">> ).
  
  