File: test_X_S.t

package info (click to toggle)
libxray-scattering-perl 0.2.2-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 168 kB
  • ctags: 27
  • sloc: perl: 392; makefile: 46; sh: 17
file content (54 lines) | stat: -rwxr-xr-x 1,282 bytes parent folder | download | duplicates (5)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/perl -w                ## -*- cperl -*-

use Xray::Scattering;

my $d = 3;
my $symb = Xray::Scattering->get_valence('F', -1);

BEGIN { $| = 1; print "1..5$/"; }
END {print "not ok 1$/" unless $loaded;}
use Xray::Absorption;
$loaded = 1;
$i = 0;
print "ok ", ++$i, $/;

if ($symb eq q{F1-}) {
  print "ok ", ++$i, $/
} else {
  print "not ok ", ++$i, $/
};

#printf "Cromer-Mann:      %s  %s  %s\n",
#  $symb, $d, Xray::Scattering->get_f($symb, $d);
#print join(" ", Xray::Scattering->get_coefficients($symb)), $/;

if (abs(7.619 - Xray::Scattering->get_f($symb, $d)) < 0.01) {
  print "ok ", ++$i, $/
} else {
  print "not ok ", ++$i, $/
};


Xray::Scattering -> load('waaskirf');
#printf "Waasmaier-Kirfel: %s  %s  %s\n",
#  $symb, $d, Xray::Scattering->get_f($symb, $d);
#print join(" ", Xray::Scattering->get_coefficients($symb)), $/;

if (abs(7.620 - Xray::Scattering->get_f($symb, $d)) < 0.01) {
  print "ok ", ++$i, $/
} else {
  print "not ok ", ++$i, $/
};



Xray::Scattering -> load('none');
#printf "None:             %s  %s  %s\n",
#  $symb, $d, Xray::Scattering->get_f($symb, $d);
#print join(" ", Xray::Scattering->get_coefficients($symb)), $/;

if (Xray::Scattering->get_f($symb, $d) == 0) {
  print "ok ", ++$i, $/
} else {
  print "not ok ", ++$i, $/
};