Updownquark / ObServe

Powerful observable application utilities
MIT License
1 stars 2 forks source link

Super Tester #12

Open Updownquark opened 6 years ago

Updownquark commented 6 years ago

ObServe needs a test suite utilizing TestHelper to randomly test every possible combination and derivation of every different type of observable structure. There are simply too many different operations on the different types to make it feasible to create and maintain adequate tests for all of them.

Updownquark commented 6 years ago

There are also a few little options that aren't being tested yet:

Updownquark commented 6 years ago

Wanted to write down how I plan to test the flattening in case I don't get to it soon.

For a flattened value of a collection, this would only be tested on the initial chain link. There would be a chance of creating a FlattenedValueLink that itself contains several collection links. When that link's modify method is called, it would either call the current link's modify, or on a chance switch out the value's collection with the collection from one of its collection links and then delegate any incoming fromAbove events to that link.

For a flattened collection of values or a collection of collections, the link would create buckets for values of the source type, with a value or collection for each bucket. When an element in the source collection is added or changed, the link would apply the correctly mapped value or collection. Modify would just apply the normal modify method to the outgoing collection.

Updownquark commented 4 years ago

Should note here that I've been working on a new version of the super tester. It's not testing all the cases that the old one did yet, but (except for a recently added test case I'm working to debug) it runs.

Updownquark commented 4 years ago

The latest super tester (rewrite no. 4) is testing more than any other version, and seems to run indefinitely. Using the TestHelper architecture, it can execute about 3 test cases per second.

Working on testing multi maps now.