2020-01-17 03:26:02 +00:00
|
|
|
#[test]
|
|
|
|
fn ui_tests() {
|
|
|
|
let t = trybuild::TestCases::new();
|
|
|
|
|
|
|
|
if cfg!(feature = "postgres") {
|
|
|
|
t.compile_fail("tests/ui/postgres/*.rs");
|
2020-01-25 04:24:39 +00:00
|
|
|
|
|
|
|
// UI tests for column types that require gated features
|
|
|
|
if cfg!(not(feature = "chrono")) {
|
|
|
|
t.compile_fail("tests/ui/postgres/gated/chrono.rs");
|
|
|
|
}
|
|
|
|
|
|
|
|
if cfg!(not(feature = "uuid")) {
|
|
|
|
t.compile_fail("tests/ui/postgres/gated/uuid.rs");
|
|
|
|
}
|
2020-01-17 03:26:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if cfg!(feature = "mysql") {
|
|
|
|
t.compile_fail("tests/ui/mysql/*.rs");
|
2020-01-25 04:24:39 +00:00
|
|
|
|
|
|
|
// UI tests for column types that require gated features
|
|
|
|
if cfg!(not(feature = "chrono")) {
|
|
|
|
t.compile_fail("tests/ui/mysql/gated/chrono.rs");
|
|
|
|
}
|
2020-01-17 03:26:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
t.compile_fail("tests/ui/*.rs");
|
|
|
|
}
|