mentat/tolstoy/Cargo.toml
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

32 lines
578 B
TOML

[package]
name = "mentat_tolstoy"
version = "0.0.1"
workspace = ".."
authors = ["Grisha Kruglov <gkruglov@mozilla.com>"]
[dependencies]
failure = "0.1.1"
failure_derive = "0.1.1"
futures = "0.1"
hyper = "0.11"
log = "0.4"
tokio-core = "0.1"
serde = "1.0"
serde_json = "1.0"
serde_cbor = "0.8.2"
serde_derive = "1.0"
lazy_static = "0.2"
uuid = { version = "0.5", features = ["v4", "serde"] }
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core]
path = "../core"
[dependencies.mentat_db]
path = "../db"
[dependencies.rusqlite]
version = "0.13"
features = ["limits"]