1
use core::fmt::Debug;
2

            
3
use bonsaidb::core::schema::{Collection, View};
4

            
5
#[derive(Collection, Debug)]
6
#[collection(name = "name", authority = "authority")]
7
struct TestCollection;
8

            
9
1
#[test]
10
1
fn name_only() {
11
1
    #[derive(View, Debug)]
12
1
    #[view(collection = TestCollection, name = "some strange name äöü")]
13
1
    #[view(key = ())]
14
1
    struct TestView;
15
1
}
16

            
17
1
#[test]
18
1
fn serialization() {
19
1
    #[derive(View, Debug)]
20
1
    #[view(collection = TestCollection)]
21
1
    #[view(key = ())]
22
1
    #[view(serialization = transmog_bincode::Bincode)]
23
1
    struct TestView;
24
1
}
25

            
26
1
#[test]
27
1
fn serialization_none() {
28
1
    #[derive(View, Debug)]
29
1
    #[view(collection = TestCollection)]
30
1
    #[view(key = ())]
31
1
    #[view(serialization = None)]
32
1
    struct TestView;
33
1
}