push
github
68 of 74 new or added lines in 7 files covered. (91.89%)
27 existing lines in 4 files now uncovered.416 of 582 relevant lines covered (71.48%)
7.13 hits per line
1 |
use std::cell::RefCell; |
|
2 |
use std::collections::HashMap; |
|
3 |
use std::rc::Rc; |
|
4 |
|
|
5 |
use crate::Attr; |
|
6 |
use crate::Context; |
|
7 |
|
|
8 |
#[derive(Debug, Clone)]
|
|
9 |
pub struct Type {
|
|
10 |
context: Rc<RefCell<Context>>,
|
|
11 |
dialect_id: u32, |
|
12 |
type_id: u32, |
|
13 |
attrs: HashMap<String, Attr>, |
|
14 |
} |
|
15 |
|
|
16 |
impl Type { |
|
UNCOV
17
|
pub fn new(
|
× |
UNCOV
18
|
context: Rc<RefCell<Context>>, |
× |
UNCOV
19
|
dialect_id: u32, |
× |
UNCOV
20
|
type_id: u32, |
× |
UNCOV
21
|
attrs: HashMap<String, Attr>, |
× |
UNCOV
22
|
) -> Self { |
× |
UNCOV
23
|
Type { |
× |
UNCOV
24
|
context, |
× |
UNCOV
25
|
dialect_id, |
× |
UNCOV
26
|
type_id, |
× |
UNCOV
27
|
attrs, |
× |
UNCOV
28
|
} |
× |
UNCOV
29
|
} |
× |
30 |
|
|
31 |
pub fn get_context(&self) -> Rc<RefCell<Context>> { |
× |
32 |
self.context.clone() |
× |
33 |
} |
× |
34 |
|
|
35 |
pub fn get_dialect_id(&self) -> u32 { |
× |
36 |
self.dialect_id |
× |
37 |
} |
× |
38 |
|
|
39 |
pub fn get_type_id(&self) -> u32 { |
× |
40 |
self.type_id |
× |
41 |
} |
× |
42 |
|
|
43 |
pub fn get_attrs(&self) -> &HashMap<String, Attr> { |
× |
44 |
&self.attrs |
× |
45 |
} |
× |
46 |
} |
|
47 |
|
|
48 |
pub trait Ty { |
|
49 |
fn get_type_name() -> &'static str;
|
|
50 |
} |