Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #228 (new enhancement)

Opened 17 years ago

Last modified 14 years ago

Unittest for container classes

Reported by: keinfarbton Assigned to: dhasenan
Priority: major Milestone: 1.0
Component: Tango Version:
Keywords: triage Cc: dhasenan

Description

Add unittests for the collection classes:

  1. Simple test with create, insert, remove, ... with these kind of types:
    • all primitive types
    • object type
    • interface type
    • struct
  1. Multithreading test for thread safety.

Attachments

HashSet.patch (12.5 kB) - added by dhasenan on 10/10/07 22:07:08.
patch for requested single-threaded unittests for HashSet?
CollectionTest.d (12.3 kB) - added by dhasenan on 10/10/07 22:29:50.
template to add basic unittests for any collection

Change History

(follow-up: ↓ 2 ) 03/04/07 19:37:40 changed by kris

  • milestone changed from 1.0 to 0.97 RC 1.

(in reply to: ↑ 1 ) 04/03/07 07:28:23 changed by keinfarbton

  • owner deleted.

Cannot do that due the lack of resources. I am sorry about that.

04/04/07 02:20:24 changed by kris

  • milestone changed from 0.97 RC 1 to 1.0.

10/10/07 22:07:08 changed by dhasenan

  • attachment HashSet.patch added.

patch for requested single-threaded unittests for HashSet?

10/10/07 22:29:14 changed by dhasenan

Given how generic those tests are, they might as well be baseline tests for every collection.

Unfortunately, there's no terribly good way to abstract the functionality. I hacked together some string mixin stuff that should work decently like so: version (UnitTest?) mixin GenericCollectionTest?!("HashSet?");

Since the collections themselves are templates, you can't do it the typesafe way (mixin GenericCollectionTest?!(HashSet?)) -- that's not a type.

10/10/07 22:29:50 changed by dhasenan

  • attachment CollectionTest.d added.

template to add basic unittests for any collection

11/04/07 00:25:18 changed by kris

  • owner set to kris.

How did this work out in the end, dhasenan?

05/24/08 17:34:04 changed by larsivi

Depending on how general these tests are or not, this ticket may be obsoleted.

06/10/08 15:49:47 changed by kris

would be nice if these worked for the revised containers :)

08/04/08 05:37:44 changed by kris

  • cc set to dhasenan.

10/05/08 06:31:53 changed by kris

  • owner changed from kris to larsivi.

punting :)

01/11/09 15:23:51 changed by larsivi

  • keywords set to triage.
  • summary changed from Unittest for collection classes to Unittest for container classes.

11/23/09 06:00:07 changed by kris

  • owner changed from larsivi to dhasenan.

is this still viable, dhasenan?