mentat/tolstoy/src
Grisha Kruglov 675a865896
Extract and improve test macros (#787) r=nalexander
* Part 1: Extract low-level test framework into mentat_db::debug for re-use.

* Part 2: Improve assert_matches!.

This corrects an incorrect pattern: a conversion method taking &self
but returning an owned value should be named like `to_FOO(&self) -> FOO`.  (A
reference-to-reference conversion should be named like `as_FOO(&self)
-> &FOO`.  A consuming conversion should be named like `into_FOO(self)
-> FOO`.)

In addition, this pushes the conversion via `to_edn` into the
`assert_matches!` macro, which lets consumers get a real data
structure (say, `Datoms`) and use it directly before or after
`assert_matches!`.  (Currently, consumers get back `edn::Value`
instances, which aren't nearly as pleasant to use as real data
structures.)

Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>

* Part 3: Use mentat_db::debug framework in Tolstoy crate.

The advantage of this approach is that compiling Tolstoy (or anything
that's not db, really) can be quite a bit faster than compiling db.
2018-07-16 13:58:34 -07:00
..
errors.rs Pre: Fix error printing rusqlite::Error. 2018-06-30 14:58:23 -07:00
lib.rs Extract and improve test macros (#787) r=nalexander 2018-07-16 13:58:34 -07:00
metadata.rs Convert tolstoy/ to failure. 2018-06-20 14:42:36 -07:00
schema.rs "Unchanged server" uploader flow (#543) r=rnewman 2018-02-09 09:55:19 -08:00
syncer.rs Extract and improve test macros (#787) r=nalexander 2018-07-16 13:58:34 -07:00
tx_mapper.rs Convert tolstoy/ to failure. 2018-06-20 14:42:36 -07:00
tx_processor.rs Revised uploader flow (battle-tested); CLI support for sync (#557) r=rnewman 2018-02-16 01:44:28 -08:00