• R/O
  • SSH
  • HTTPS

eirrepo: Commit


Commit MetaInfo

Revision181 (tree)
Time2018-12-28 21:43:53
Authorquiret

Log Message

- adjusted the unit tests

Change Summary

Incremental Difference

--- unittests/src/sortedslicesector.cpp (revision 180)
+++ unittests/src/sortedslicesector.cpp (revision 181)
@@ -278,16 +278,14 @@
278278 return true;
279279 }
280280
281- void Update( sliceOfData <size_t> newSlice, bool *hasUpdated )
281+ void Update( sliceOfData <size_t> newSlice )
282282 {
283- *hasUpdated = true;
284-
285283 this->slice = std::move( newSlice );
286284 }
287285
288- void Remove( bool *hasRemoved )
286+ void Remove( void )
289287 {
290- *hasRemoved = true;
288+ return;
291289 }
292290
293291 sliceOfData <size_t> GetNodeSlice( void ) const
@@ -310,7 +308,7 @@
310308
311309 slices.Insert( { 5, 5 }, &hasCreated );
312310
313- assert( hasCreated == true );
311+ assert( hasCreated == false );
314312
315313 for ( const some_metadata& data : slices )
316314 {
@@ -317,11 +315,9 @@
317315 assert( data.slice.GetSliceStartPoint() == 0 && data.slice.GetSliceEndPoint() == 9 );
318316 }
319317
320- hasCreated = false;
318+ slices.Remove( { 0, 10 } );
321319
322- slices.Remove( { 0, 10 }, &hasCreated );
323-
324- assert( hasCreated == true );
320+ assert( slices.IsEmpty() == true );
325321 }
326322 printf( "ok.\n" );
327323
@@ -646,7 +642,7 @@
646642 return ( this->type == type );
647643 }
648644
649- void Update( eir::mathSlice <float> slice, data_type type )
645+ void Update( eir::mathSlice <float> slice )
650646 {
651647 this->slice = std::move( slice );
652648 }
@@ -703,7 +699,7 @@
703699 return ( this->type == type );
704700 }
705701
706- void Update( eir::mathSlice <int> slice, data_type type )
702+ void Update( eir::mathSlice <int> slice )
707703 {
708704 this->slice = std::move( slice );
709705 }
Show on old repository browser