test.rs 1.08 KB
Newer Older
1 2 3
extern crate pdbparser;

#[test]
4
fn parse_f2() {
5
    use pdbparser;
6
    let my_prot = pdbparser::parse_pdb("tests/tests_file/f2.pdb", "f2");
7 8 9 10
    assert_eq!(1, my_prot.get_number_chain());
    assert_eq!(66, my_prot.get_number_residue());
    assert_eq!(1085, my_prot.get_number_atom());
}
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

#[test]
fn parse_f2_adn() {
    use pdbparser;
    let my_prot = pdbparser::parse_pdb("tests/tests_file/f2_adn.pdb", "f2");
    assert_eq!(1, my_prot.get_number_chain());
    assert_eq!(66, my_prot.get_number_residue());
    assert_eq!(1085, my_prot.get_number_atom());
}

#[test]
fn parse_trp() {
    use pdbparser;
    let my_prot = pdbparser::parse_pdb("tests/tests_file/trp_MD.pdb", "trp");
    assert_eq!(1, my_prot.get_number_chain());
    assert_eq!(704, my_prot.get_number_residue());
    assert_eq!(10688, my_prot.get_number_atom());
}

#[test]
fn parse_5jpq() {
    use pdbparser;
    let my_prot = pdbparser::parse_pdb("tests/tests_file/5jpq.pdb", "5jpq");
    assert_eq!(35, my_prot.get_number_chain());
    assert_eq!(8173, my_prot.get_number_residue());
    assert_eq!(44801, my_prot.get_number_atom());
}