forked from jmwoll/goccs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparameters_test.go
38 lines (35 loc) · 1.3 KB
/
parameters_test.go
1
2
3
4
5
6
7
8
9
10
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
38
package main
// Copyright (C) 2017-2018 Jan Wollschläger <[email protected]>
// This file is part of goccs.
//
// goccs is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import (
"testing"
)
func TestParametersforname(t *testing.T) {
rslt := PAParametersforname("mobcal")
if rslt == nil {
t.Errorf("parametersforname('mobcal') should not be null!")
}
if rslt["H"] != 2.2 || rslt["C"] != 2.7 || rslt["N"] != 2.7 || rslt["O"] != 2.7 {
t.Errorf("wrong mobcal parameters loaded")
}
rslt = PAParametersforname("")
if rslt == nil {
t.Errorf("parametersforname('') should not be null!")
}
if rslt["H"] != 2.01 || rslt["C"] != 2.35 || rslt["N"] != 2.26 || rslt["O"] != 2.26 {
t.Errorf("wrong default (siu et al) parameters loaded")
}
}