crystalcell 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/test_element.rb CHANGED
@@ -3,653 +3,433 @@
3
3
  require "helper"
4
4
 
5
5
  class TC_Element < Test::Unit::TestCase
6
- def setup
7
- @e = CrystalCell::Element.new
8
- end
6
+ ELEM = CrystalCell::Element
9
7
 
10
- def test_atomicNumber
11
- assert_equal( 1, @e.getAtomicNumber( 'H' ))
12
- assert_equal( 2, @e.getAtomicNumber( 'He' ))
13
- assert_equal( 3, @e.getAtomicNumber( 'Li' ))
14
- assert_equal( 4, @e.getAtomicNumber( 'Be' ))
15
- assert_equal( 5, @e.getAtomicNumber( 'B' ))
16
- assert_equal( 6, @e.getAtomicNumber( 'C' ))
17
- assert_equal( 7, @e.getAtomicNumber( 'N' ))
18
- assert_equal( 8, @e.getAtomicNumber( 'O' ))
19
- assert_equal( 9, @e.getAtomicNumber( 'F' ))
20
- assert_equal( 10, @e.getAtomicNumber( 'Ne' ))
21
- assert_equal( 11, @e.getAtomicNumber( 'Na' ))
22
- assert_equal( 12, @e.getAtomicNumber( 'Mg' ))
23
- assert_equal( 13, @e.getAtomicNumber( 'Al' ))
24
- assert_equal( 14, @e.getAtomicNumber( 'Si' ))
25
- assert_equal( 15, @e.getAtomicNumber( 'P' ))
26
- assert_equal( 16, @e.getAtomicNumber( 'S' ))
27
- assert_equal( 17, @e.getAtomicNumber( 'Cl' ))
28
- assert_equal( 18, @e.getAtomicNumber( 'Ar' ))
29
- assert_equal( 19, @e.getAtomicNumber( 'K' ))
30
- assert_equal( 20, @e.getAtomicNumber( 'Ca' ))
31
- assert_equal( 21, @e.getAtomicNumber( 'Sc' ))
32
- assert_equal( 22, @e.getAtomicNumber( 'Ti' ))
33
- assert_equal( 23, @e.getAtomicNumber( 'V' ))
34
- assert_equal( 24, @e.getAtomicNumber( 'Cr' ))
35
- assert_equal( 25, @e.getAtomicNumber( 'Mn' ))
36
- assert_equal( 26, @e.getAtomicNumber( 'Fe' ))
37
- assert_equal( 27, @e.getAtomicNumber( 'Co' ))
38
- assert_equal( 28, @e.getAtomicNumber( 'Ni' ))
39
- assert_equal( 29, @e.getAtomicNumber( 'Cu' ))
40
- assert_equal( 30, @e.getAtomicNumber( 'Zn' ))
41
- assert_equal( 31, @e.getAtomicNumber( 'Ga' ))
42
- assert_equal( 32, @e.getAtomicNumber( 'Ge' ))
43
- assert_equal( 33, @e.getAtomicNumber( 'As' ))
44
- assert_equal( 34, @e.getAtomicNumber( 'Se' ))
45
- assert_equal( 35, @e.getAtomicNumber( 'Br' ))
46
- assert_equal( 36, @e.getAtomicNumber( 'Kr' ))
47
- assert_equal( 37, @e.getAtomicNumber( 'Rb' ))
48
- assert_equal( 38, @e.getAtomicNumber( 'Sr' ))
49
- assert_equal( 39, @e.getAtomicNumber( 'Y' ))
50
- assert_equal( 40, @e.getAtomicNumber( 'Zr' ))
51
- assert_equal( 41, @e.getAtomicNumber( 'Nb' ))
52
- assert_equal( 42, @e.getAtomicNumber( 'Mo' ))
53
- assert_equal( 43, @e.getAtomicNumber( 'Tc' ))
54
- assert_equal( 44, @e.getAtomicNumber( 'Ru' ))
55
- assert_equal( 45, @e.getAtomicNumber( 'Rh' ))
56
- assert_equal( 46, @e.getAtomicNumber( 'Pd' ))
57
- assert_equal( 47, @e.getAtomicNumber( 'Ag' ))
58
- assert_equal( 48, @e.getAtomicNumber( 'Cd' ))
59
- assert_equal( 49, @e.getAtomicNumber( 'In' ))
60
- assert_equal( 50, @e.getAtomicNumber( 'Sn' ))
61
- assert_equal( 51, @e.getAtomicNumber( 'Sb' ))
62
- assert_equal( 52, @e.getAtomicNumber( 'Te' ))
63
- assert_equal( 53, @e.getAtomicNumber( 'I' ))
64
- assert_equal( 54, @e.getAtomicNumber( 'Xe' ))
65
- assert_equal( 55, @e.getAtomicNumber( 'Cs' ))
66
- assert_equal( 56, @e.getAtomicNumber( 'Ba' ))
67
- assert_equal( 57, @e.getAtomicNumber( 'La' ))
68
- assert_equal( 58, @e.getAtomicNumber( 'Ce' ))
69
- assert_equal( 59, @e.getAtomicNumber( 'Pr' ))
70
- assert_equal( 60, @e.getAtomicNumber( 'Nd' ))
71
- assert_equal( 61, @e.getAtomicNumber( 'Pm' ))
72
- assert_equal( 62, @e.getAtomicNumber( 'Sm' ))
73
- assert_equal( 63, @e.getAtomicNumber( 'Eu' ))
74
- assert_equal( 64, @e.getAtomicNumber( 'Gd' ))
75
- assert_equal( 65, @e.getAtomicNumber( 'Tb' ))
76
- assert_equal( 66, @e.getAtomicNumber( 'Dy' ))
77
- assert_equal( 67, @e.getAtomicNumber( 'Ho' ))
78
- assert_equal( 68, @e.getAtomicNumber( 'Er' ))
79
- assert_equal( 69, @e.getAtomicNumber( 'Tm' ))
80
- assert_equal( 70, @e.getAtomicNumber( 'Yb' ))
81
- assert_equal( 71, @e.getAtomicNumber( 'Lu' ))
82
- assert_equal( 72, @e.getAtomicNumber( 'Hf' ))
83
- assert_equal( 73, @e.getAtomicNumber( 'Ta' ))
84
- assert_equal( 74, @e.getAtomicNumber( 'W' ))
85
- assert_equal( 75, @e.getAtomicNumber( 'Re' ))
86
- assert_equal( 76, @e.getAtomicNumber( 'Os' ))
87
- assert_equal( 77, @e.getAtomicNumber( 'Ir' ))
88
- assert_equal( 78, @e.getAtomicNumber( 'Pt' ))
89
- assert_equal( 79, @e.getAtomicNumber( 'Au' ))
90
- assert_equal( 80, @e.getAtomicNumber( 'Hg' ))
91
- assert_equal( 81, @e.getAtomicNumber( 'Tl' ))
92
- assert_equal( 82, @e.getAtomicNumber( 'Pb' ))
93
- assert_equal( 83, @e.getAtomicNumber( 'Bi' ))
94
- assert_equal( 84, @e.getAtomicNumber( 'Po' ))
95
- assert_equal( 85, @e.getAtomicNumber( 'At' ))
96
- assert_equal( 86, @e.getAtomicNumber( 'Rn' ))
97
- assert_equal( 87, @e.getAtomicNumber( 'Fr' ))
98
- assert_equal( 88, @e.getAtomicNumber( 'Ra' ))
99
- assert_equal( 89, @e.getAtomicNumber( 'Ac' ))
100
- assert_equal( 90, @e.getAtomicNumber( 'Th' ))
101
- assert_equal( 91, @e.getAtomicNumber( 'Pa' ))
102
- assert_equal( 92, @e.getAtomicNumber( 'U' ))
103
- assert_equal( 93, @e.getAtomicNumber( 'Np' ))
104
- assert_equal( 94, @e.getAtomicNumber( 'Pu' ))
105
- assert_equal( 95, @e.getAtomicNumber( 'Am' ))
106
- assert_equal( 96, @e.getAtomicNumber( 'Cm' ))
107
- assert_equal( 97, @e.getAtomicNumber( 'Bk' ))
108
- assert_equal( 98, @e.getAtomicNumber( 'Cf' ))
109
- assert_equal( 99, @e.getAtomicNumber( 'Es' ))
110
- assert_equal(100, @e.getAtomicNumber( 'Fm' ))
111
- assert_equal(101, @e.getAtomicNumber( 'Md' ))
112
- assert_equal(102, @e.getAtomicNumber( 'No' ))
113
- assert_equal(103, @e.getAtomicNumber( 'Lr' ))
114
- #assert_equal( 1, @e.getAtomicNumber( 1 ))
115
- #assert_equal( 2, @e.getAtomicNumber( 2 ))
116
- #assert_equal( 3, @e.getAtomicNumber( 3 ))
117
- #assert_equal( 4, @e.getAtomicNumber( 4 ))
118
- #assert_equal( 5, @e.getAtomicNumber( 5 ))
119
- #assert_equal( 6, @e.getAtomicNumber( 6 ))
120
- #assert_equal( 7, @e.getAtomicNumber( 7 ))
121
- #assert_equal( 8, @e.getAtomicNumber( 8 ))
122
- #assert_equal( 9, @e.getAtomicNumber( 9 ))
123
- #assert_equal( 10, @e.getAtomicNumber( 10 ))
124
- #assert_equal( 11, @e.getAtomicNumber( 11 ))
125
- #assert_equal( 12, @e.getAtomicNumber( 12 ))
126
- #assert_equal( 13, @e.getAtomicNumber( 13 ))
127
- #assert_equal( 14, @e.getAtomicNumber( 14 ))
128
- #assert_equal( 15, @e.getAtomicNumber( 15 ))
129
- #assert_equal( 16, @e.getAtomicNumber( 16 ))
130
- #assert_equal( 17, @e.getAtomicNumber( 17 ))
131
- #assert_equal( 18, @e.getAtomicNumber( 18 ))
132
- #assert_equal( 19, @e.getAtomicNumber( 19 ))
133
- #assert_equal( 20, @e.getAtomicNumber( 20 ))
134
- #assert_equal( 21, @e.getAtomicNumber( 21 ))
135
- #assert_equal( 22, @e.getAtomicNumber( 22 ))
136
- #assert_equal( 23, @e.getAtomicNumber( 23 ))
137
- #assert_equal( 24, @e.getAtomicNumber( 24 ))
138
- #assert_equal( 25, @e.getAtomicNumber( 25 ))
139
- #assert_equal( 26, @e.getAtomicNumber( 26 ))
140
- #assert_equal( 27, @e.getAtomicNumber( 27 ))
141
- #assert_equal( 28, @e.getAtomicNumber( 28 ))
142
- #assert_equal( 29, @e.getAtomicNumber( 29 ))
143
- #assert_equal( 30, @e.getAtomicNumber( 30 ))
144
- #assert_equal( 31, @e.getAtomicNumber( 31 ))
145
- #assert_equal( 32, @e.getAtomicNumber( 32 ))
146
- #assert_equal( 33, @e.getAtomicNumber( 33 ))
147
- #assert_equal( 34, @e.getAtomicNumber( 34 ))
148
- #assert_equal( 35, @e.getAtomicNumber( 35 ))
149
- #assert_equal( 36, @e.getAtomicNumber( 36 ))
150
- #assert_equal( 37, @e.getAtomicNumber( 37 ))
151
- #assert_equal( 38, @e.getAtomicNumber( 38 ))
152
- #assert_equal( 39, @e.getAtomicNumber( 39 ))
153
- #assert_equal( 40, @e.getAtomicNumber( 40 ))
154
- #assert_equal( 41, @e.getAtomicNumber( 41 ))
155
- #assert_equal( 42, @e.getAtomicNumber( 42 ))
156
- #assert_equal( 43, @e.getAtomicNumber( 43 ))
157
- #assert_equal( 44, @e.getAtomicNumber( 44 ))
158
- #assert_equal( 45, @e.getAtomicNumber( 45 ))
159
- #assert_equal( 46, @e.getAtomicNumber( 46 ))
160
- #assert_equal( 47, @e.getAtomicNumber( 47 ))
161
- #assert_equal( 48, @e.getAtomicNumber( 48 ))
162
- #assert_equal( 49, @e.getAtomicNumber( 49 ))
163
- #assert_equal( 50, @e.getAtomicNumber( 50 ))
164
- #assert_equal( 51, @e.getAtomicNumber( 51 ))
165
- #assert_equal( 52, @e.getAtomicNumber( 52 ))
166
- #assert_equal( 53, @e.getAtomicNumber( 53 ))
167
- #assert_equal( 54, @e.getAtomicNumber( 54 ))
168
- #assert_equal( 55, @e.getAtomicNumber( 55 ))
169
- #assert_equal( 56, @e.getAtomicNumber( 56 ))
170
- #assert_equal( 57, @e.getAtomicNumber( 57 ))
171
- #assert_equal( 58, @e.getAtomicNumber( 58 ))
172
- #assert_equal( 59, @e.getAtomicNumber( 59 ))
173
- #assert_equal( 60, @e.getAtomicNumber( 60 ))
174
- #assert_equal( 61, @e.getAtomicNumber( 61 ))
175
- #assert_equal( 62, @e.getAtomicNumber( 62 ))
176
- #assert_equal( 63, @e.getAtomicNumber( 63 ))
177
- #assert_equal( 64, @e.getAtomicNumber( 64 ))
178
- #assert_equal( 65, @e.getAtomicNumber( 65 ))
179
- #assert_equal( 66, @e.getAtomicNumber( 66 ))
180
- #assert_equal( 67, @e.getAtomicNumber( 67 ))
181
- #assert_equal( 68, @e.getAtomicNumber( 68 ))
182
- #assert_equal( 69, @e.getAtomicNumber( 69 ))
183
- #assert_equal( 70, @e.getAtomicNumber( 70 ))
184
- #assert_equal( 71, @e.getAtomicNumber( 71 ))
185
- #assert_equal( 72, @e.getAtomicNumber( 72 ))
186
- #assert_equal( 73, @e.getAtomicNumber( 73 ))
187
- #assert_equal( 74, @e.getAtomicNumber( 74 ))
188
- #assert_equal( 75, @e.getAtomicNumber( 75 ))
189
- #assert_equal( 76, @e.getAtomicNumber( 76 ))
190
- #assert_equal( 77, @e.getAtomicNumber( 77 ))
191
- #assert_equal( 78, @e.getAtomicNumber( 78 ))
192
- #assert_equal( 79, @e.getAtomicNumber( 79 ))
193
- #assert_equal( 80, @e.getAtomicNumber( 80 ))
194
- #assert_equal( 81, @e.getAtomicNumber( 81 ))
195
- #assert_equal( 82, @e.getAtomicNumber( 82 ))
196
- #assert_equal( 83, @e.getAtomicNumber( 83 ))
197
- #assert_equal( 84, @e.getAtomicNumber( 84 ))
198
- #assert_equal( 85, @e.getAtomicNumber( 85 ))
199
- #assert_equal( 86, @e.getAtomicNumber( 86 ))
200
- #assert_equal( 87, @e.getAtomicNumber( 87 ))
201
- #assert_equal( 88, @e.getAtomicNumber( 88 ))
202
- #assert_equal( 89, @e.getAtomicNumber( 89 ))
203
- #assert_equal( 90, @e.getAtomicNumber( 90 ))
204
- #assert_equal( 91, @e.getAtomicNumber( 91 ))
205
- #assert_equal( 92, @e.getAtomicNumber( 92 ))
206
- #assert_equal( 93, @e.getAtomicNumber( 93 ))
207
- #assert_equal( 94, @e.getAtomicNumber( 94 ))
208
- #assert_equal( 95, @e.getAtomicNumber( 95 ))
209
- #assert_equal( 96, @e.getAtomicNumber( 96 ))
210
- #assert_equal( 97, @e.getAtomicNumber( 97 ))
211
- #assert_equal( 98, @e.getAtomicNumber( 98 ))
212
- #assert_equal( 99, @e.getAtomicNumber( 99 ))
213
- #assert_equal(100, @e.getAtomicNumber( 100 ))
214
- #assert_equal(101, @e.getAtomicNumber( 101 ))
215
- #assert_equal(102, @e.getAtomicNumber( 102 ))
216
- #assert_equal(103, @e.getAtomicNumber( 103 ))
8
+ def setup
9
+ @e = CrystalCell::Element.new
10
+ end
217
11
 
218
- assert_raise(RuntimeError){@e.getAtomicNumber( nil )}
219
- assert_raise(RuntimeError){@e.getAtomicNumber( 'A' )}
220
- assert_raise(RuntimeError){@e.getAtomicNumber( -1 )}
221
- assert_raise(RuntimeError){@e.getAtomicNumber( 0 )}
222
- assert_raise(RuntimeError){@e.getAtomicNumber( 104 )}
223
- end
12
+ include
224
13
 
225
- def test_getSymbol
226
- #assert_equal('H' , @e.getSymbol( 'H' ))
227
- #assert_equal('He', @e.getSymbol( 'He' ))
228
- #assert_equal('Li', @e.getSymbol( 'Li' ))
229
- #assert_equal('Be', @e.getSymbol( 'Be' ))
230
- #assert_equal('B' , @e.getSymbol( 'B' ))
231
- #assert_equal('C' , @e.getSymbol( 'C' ))
232
- #assert_equal('N' , @e.getSymbol( 'N' ))
233
- #assert_equal('O' , @e.getSymbol( 'O' ))
234
- #assert_equal('F' , @e.getSymbol( 'F' ))
235
- #assert_equal('Ne', @e.getSymbol( 'Ne' ))
236
- #assert_equal('Na', @e.getSymbol( 'Na' ))
237
- #assert_equal('Mg', @e.getSymbol( 'Mg' ))
238
- #assert_equal('Al', @e.getSymbol( 'Al' ))
239
- #assert_equal('Si', @e.getSymbol( 'Si' ))
240
- #assert_equal('P' , @e.getSymbol( 'P' ))
241
- #assert_equal('S' , @e.getSymbol( 'S' ))
242
- #assert_equal('Cl', @e.getSymbol( 'Cl' ))
243
- #assert_equal('Ar', @e.getSymbol( 'Ar' ))
244
- #assert_equal('K' , @e.getSymbol( 'K' ))
245
- #assert_equal('Ca', @e.getSymbol( 'Ca' ))
246
- #assert_equal('Sc', @e.getSymbol( 'Sc' ))
247
- #assert_equal('Ti', @e.getSymbol( 'Ti' ))
248
- #assert_equal('V' , @e.getSymbol( 'V' ))
249
- #assert_equal('Cr', @e.getSymbol( 'Cr' ))
250
- #assert_equal('Mn', @e.getSymbol( 'Mn' ))
251
- #assert_equal('Fe', @e.getSymbol( 'Fe' ))
252
- #assert_equal('Co', @e.getSymbol( 'Co' ))
253
- #assert_equal('Ni', @e.getSymbol( 'Ni' ))
254
- #assert_equal('Cu', @e.getSymbol( 'Cu' ))
255
- #assert_equal('Zn', @e.getSymbol( 'Zn' ))
256
- #assert_equal('Ga', @e.getSymbol( 'Ga' ))
257
- #assert_equal('Ge', @e.getSymbol( 'Ge' ))
258
- #assert_equal('As', @e.getSymbol( 'As' ))
259
- #assert_equal('Se', @e.getSymbol( 'Se' ))
260
- #assert_equal('Br', @e.getSymbol( 'Br' ))
261
- #assert_equal('Kr', @e.getSymbol( 'Kr' ))
262
- #assert_equal('Rb', @e.getSymbol( 'Rb' ))
263
- #assert_equal('Sr', @e.getSymbol( 'Sr' ))
264
- #assert_equal('Y' , @e.getSymbol( 'Y' ))
265
- #assert_equal('Zr', @e.getSymbol( 'Zr' ))
266
- #assert_equal('Nb', @e.getSymbol( 'Nb' ))
267
- #assert_equal('Mo', @e.getSymbol( 'Mo' ))
268
- #assert_equal('Tc', @e.getSymbol( 'Tc' ))
269
- #assert_equal('Ru', @e.getSymbol( 'Ru' ))
270
- #assert_equal('Rh', @e.getSymbol( 'Rh' ))
271
- #assert_equal('Pd', @e.getSymbol( 'Pd' ))
272
- #assert_equal('Ag', @e.getSymbol( 'Ag' ))
273
- #assert_equal('Cd', @e.getSymbol( 'Cd' ))
274
- #assert_equal('In', @e.getSymbol( 'In' ))
275
- #assert_equal('Sn', @e.getSymbol( 'Sn' ))
276
- #assert_equal('Sb', @e.getSymbol( 'Sb' ))
277
- #assert_equal('Te', @e.getSymbol( 'Te' ))
278
- #assert_equal('I' , @e.getSymbol( 'I' ))
279
- #assert_equal('Xe', @e.getSymbol( 'Xe' ))
280
- #assert_equal('Cs', @e.getSymbol( 'Cs' ))
281
- #assert_equal('Ba', @e.getSymbol( 'Ba' ))
282
- #assert_equal('La', @e.getSymbol( 'La' ))
283
- #assert_equal('Ce', @e.getSymbol( 'Ce' ))
284
- #assert_equal('Pr', @e.getSymbol( 'Pr' ))
285
- #assert_equal('Nd', @e.getSymbol( 'Nd' ))
286
- #assert_equal('Pm', @e.getSymbol( 'Pm' ))
287
- #assert_equal('Sm', @e.getSymbol( 'Sm' ))
288
- #assert_equal('Eu', @e.getSymbol( 'Eu' ))
289
- #assert_equal('Gd', @e.getSymbol( 'Gd' ))
290
- #assert_equal('Tb', @e.getSymbol( 'Tb' ))
291
- #assert_equal('Dy', @e.getSymbol( 'Dy' ))
292
- #assert_equal('Ho', @e.getSymbol( 'Ho' ))
293
- #assert_equal('Er', @e.getSymbol( 'Er' ))
294
- #assert_equal('Tm', @e.getSymbol( 'Tm' ))
295
- #assert_equal('Yb', @e.getSymbol( 'Yb' ))
296
- #assert_equal('Lu', @e.getSymbol( 'Lu' ))
297
- #assert_equal('Hf', @e.getSymbol( 'Hf' ))
298
- #assert_equal('Ta', @e.getSymbol( 'Ta' ))
299
- #assert_equal('W' , @e.getSymbol( 'W' ))
300
- #assert_equal('Re', @e.getSymbol( 'Re' ))
301
- #assert_equal('Os', @e.getSymbol( 'Os' ))
302
- #assert_equal('Ir', @e.getSymbol( 'Ir' ))
303
- #assert_equal('Pt', @e.getSymbol( 'Pt' ))
304
- #assert_equal('Au', @e.getSymbol( 'Au' ))
305
- #assert_equal('Hg', @e.getSymbol( 'Hg' ))
306
- #assert_equal('Tl', @e.getSymbol( 'Tl' ))
307
- #assert_equal('Pb', @e.getSymbol( 'Pb' ))
308
- #assert_equal('Bi', @e.getSymbol( 'Bi' ))
309
- #assert_equal('Po', @e.getSymbol( 'Po' ))
310
- #assert_equal('At', @e.getSymbol( 'At' ))
311
- #assert_equal('Rn', @e.getSymbol( 'Rn' ))
312
- #assert_equal('Fr', @e.getSymbol( 'Fr' ))
313
- #assert_equal('Ra', @e.getSymbol( 'Ra' ))
314
- #assert_equal('Ac', @e.getSymbol( 'Ac' ))
315
- #assert_equal('Th', @e.getSymbol( 'Th' ))
316
- #assert_equal('Pa', @e.getSymbol( 'Pa' ))
317
- #assert_equal('U' , @e.getSymbol( 'U' ))
318
- #assert_equal('Np', @e.getSymbol( 'Np' ))
319
- #assert_equal('Pu', @e.getSymbol( 'Pu' ))
320
- #assert_equal('Am', @e.getSymbol( 'Am' ))
321
- #assert_equal('Cm', @e.getSymbol( 'Cm' ))
322
- #assert_equal('Bk', @e.getSymbol( 'Bk' ))
323
- #assert_equal('Cf', @e.getSymbol( 'Cf' ))
324
- #assert_equal('Es', @e.getSymbol( 'Es' ))
325
- #assert_equal('Fm', @e.getSymbol( 'Fm' ))
326
- #assert_equal('Md', @e.getSymbol( 'Md' ))
327
- #assert_equal('No', @e.getSymbol( 'No' ))
328
- #assert_equal('Lr', @e.getSymbol( 'Lr' ))
329
- assert_equal('H' , @e.getSymbol( 1 ))
330
- assert_equal('He', @e.getSymbol( 2 ))
331
- assert_equal('Li', @e.getSymbol( 3 ))
332
- assert_equal('Be', @e.getSymbol( 4 ))
333
- assert_equal('B' , @e.getSymbol( 5 ))
334
- assert_equal('C' , @e.getSymbol( 6 ))
335
- assert_equal('N' , @e.getSymbol( 7 ))
336
- assert_equal('O' , @e.getSymbol( 8 ))
337
- assert_equal('F' , @e.getSymbol( 9 ))
338
- assert_equal('Ne', @e.getSymbol( 10 ))
339
- assert_equal('Na', @e.getSymbol( 11 ))
340
- assert_equal('Mg', @e.getSymbol( 12 ))
341
- assert_equal('Al', @e.getSymbol( 13 ))
342
- assert_equal('Si', @e.getSymbol( 14 ))
343
- assert_equal('P' , @e.getSymbol( 15 ))
344
- assert_equal('S' , @e.getSymbol( 16 ))
345
- assert_equal('Cl', @e.getSymbol( 17 ))
346
- assert_equal('Ar', @e.getSymbol( 18 ))
347
- assert_equal('K' , @e.getSymbol( 19 ))
348
- assert_equal('Ca', @e.getSymbol( 20 ))
349
- assert_equal('Sc', @e.getSymbol( 21 ))
350
- assert_equal('Ti', @e.getSymbol( 22 ))
351
- assert_equal('V' , @e.getSymbol( 23 ))
352
- assert_equal('Cr', @e.getSymbol( 24 ))
353
- assert_equal('Mn', @e.getSymbol( 25 ))
354
- assert_equal('Fe', @e.getSymbol( 26 ))
355
- assert_equal('Co', @e.getSymbol( 27 ))
356
- assert_equal('Ni', @e.getSymbol( 28 ))
357
- assert_equal('Cu', @e.getSymbol( 29 ))
358
- assert_equal('Zn', @e.getSymbol( 30 ))
359
- assert_equal('Ga', @e.getSymbol( 31 ))
360
- assert_equal('Ge', @e.getSymbol( 32 ))
361
- assert_equal('As', @e.getSymbol( 33 ))
362
- assert_equal('Se', @e.getSymbol( 34 ))
363
- assert_equal('Br', @e.getSymbol( 35 ))
364
- assert_equal('Kr', @e.getSymbol( 36 ))
365
- assert_equal('Rb', @e.getSymbol( 37 ))
366
- assert_equal('Sr', @e.getSymbol( 38 ))
367
- assert_equal('Y' , @e.getSymbol( 39 ))
368
- assert_equal('Zr', @e.getSymbol( 40 ))
369
- assert_equal('Nb', @e.getSymbol( 41 ))
370
- assert_equal('Mo', @e.getSymbol( 42 ))
371
- assert_equal('Tc', @e.getSymbol( 43 ))
372
- assert_equal('Ru', @e.getSymbol( 44 ))
373
- assert_equal('Rh', @e.getSymbol( 45 ))
374
- assert_equal('Pd', @e.getSymbol( 46 ))
375
- assert_equal('Ag', @e.getSymbol( 47 ))
376
- assert_equal('Cd', @e.getSymbol( 48 ))
377
- assert_equal('In', @e.getSymbol( 49 ))
378
- assert_equal('Sn', @e.getSymbol( 50 ))
379
- assert_equal('Sb', @e.getSymbol( 51 ))
380
- assert_equal('Te', @e.getSymbol( 52 ))
381
- assert_equal('I' , @e.getSymbol( 53 ))
382
- assert_equal('Xe', @e.getSymbol( 54 ))
383
- assert_equal('Cs', @e.getSymbol( 55 ))
384
- assert_equal('Ba', @e.getSymbol( 56 ))
385
- assert_equal('La', @e.getSymbol( 57 ))
386
- assert_equal('Ce', @e.getSymbol( 58 ))
387
- assert_equal('Pr', @e.getSymbol( 59 ))
388
- assert_equal('Nd', @e.getSymbol( 60 ))
389
- assert_equal('Pm', @e.getSymbol( 61 ))
390
- assert_equal('Sm', @e.getSymbol( 62 ))
391
- assert_equal('Eu', @e.getSymbol( 63 ))
392
- assert_equal('Gd', @e.getSymbol( 64 ))
393
- assert_equal('Tb', @e.getSymbol( 65 ))
394
- assert_equal('Dy', @e.getSymbol( 66 ))
395
- assert_equal('Ho', @e.getSymbol( 67 ))
396
- assert_equal('Er', @e.getSymbol( 68 ))
397
- assert_equal('Tm', @e.getSymbol( 69 ))
398
- assert_equal('Yb', @e.getSymbol( 70 ))
399
- assert_equal('Lu', @e.getSymbol( 71 ))
400
- assert_equal('Hf', @e.getSymbol( 72 ))
401
- assert_equal('Ta', @e.getSymbol( 73 ))
402
- assert_equal('W' , @e.getSymbol( 74 ))
403
- assert_equal('Re', @e.getSymbol( 75 ))
404
- assert_equal('Os', @e.getSymbol( 76 ))
405
- assert_equal('Ir', @e.getSymbol( 77 ))
406
- assert_equal('Pt', @e.getSymbol( 78 ))
407
- assert_equal('Au', @e.getSymbol( 79 ))
408
- assert_equal('Hg', @e.getSymbol( 80 ))
409
- assert_equal('Tl', @e.getSymbol( 81 ))
410
- assert_equal('Pb', @e.getSymbol( 82 ))
411
- assert_equal('Bi', @e.getSymbol( 83 ))
412
- assert_equal('Po', @e.getSymbol( 84 ))
413
- assert_equal('At', @e.getSymbol( 85 ))
414
- assert_equal('Rn', @e.getSymbol( 86 ))
415
- assert_equal('Fr', @e.getSymbol( 87 ))
416
- assert_equal('Ra', @e.getSymbol( 88 ))
417
- assert_equal('Ac', @e.getSymbol( 89 ))
418
- assert_equal('Th', @e.getSymbol( 90 ))
419
- assert_equal('Pa', @e.getSymbol( 91 ))
420
- assert_equal('U' , @e.getSymbol( 92 ))
421
- assert_equal('Np', @e.getSymbol( 93 ))
422
- assert_equal('Pu', @e.getSymbol( 94 ))
423
- assert_equal('Am', @e.getSymbol( 95 ))
424
- assert_equal('Cm', @e.getSymbol( 96 ))
425
- assert_equal('Bk', @e.getSymbol( 97 ))
426
- assert_equal('Cf', @e.getSymbol( 98 ))
427
- assert_equal('Es', @e.getSymbol( 99 ))
428
- assert_equal('Fm', @e.getSymbol( 100 ))
429
- assert_equal('Md', @e.getSymbol( 101 ))
430
- assert_equal('No', @e.getSymbol( 102 ))
431
- assert_equal('Lr', @e.getSymbol( 103 ))
14
+ def test_atomicNumber
15
+ assert_equal( 1, ELEM.symbol_to_num( 'H' ))
16
+ assert_equal( 2, ELEM.symbol_to_num( 'He' ))
17
+ assert_equal( 3, ELEM.symbol_to_num( 'Li' ))
18
+ assert_equal( 4, ELEM.symbol_to_num( 'Be' ))
19
+ assert_equal( 5, ELEM.symbol_to_num( 'B' ))
20
+ assert_equal( 6, ELEM.symbol_to_num( 'C' ))
21
+ assert_equal( 7, ELEM.symbol_to_num( 'N' ))
22
+ assert_equal( 8, ELEM.symbol_to_num( 'O' ))
23
+ assert_equal( 9, ELEM.symbol_to_num( 'F' ))
24
+ assert_equal( 10, ELEM.symbol_to_num( 'Ne' ))
25
+ assert_equal( 11, ELEM.symbol_to_num( 'Na' ))
26
+ assert_equal( 12, ELEM.symbol_to_num( 'Mg' ))
27
+ assert_equal( 13, ELEM.symbol_to_num( 'Al' ))
28
+ assert_equal( 14, ELEM.symbol_to_num( 'Si' ))
29
+ assert_equal( 15, ELEM.symbol_to_num( 'P' ))
30
+ assert_equal( 16, ELEM.symbol_to_num( 'S' ))
31
+ assert_equal( 17, ELEM.symbol_to_num( 'Cl' ))
32
+ assert_equal( 18, ELEM.symbol_to_num( 'Ar' ))
33
+ assert_equal( 19, ELEM.symbol_to_num( 'K' ))
34
+ assert_equal( 20, ELEM.symbol_to_num( 'Ca' ))
35
+ assert_equal( 21, ELEM.symbol_to_num( 'Sc' ))
36
+ assert_equal( 22, ELEM.symbol_to_num( 'Ti' ))
37
+ assert_equal( 23, ELEM.symbol_to_num( 'V' ))
38
+ assert_equal( 24, ELEM.symbol_to_num( 'Cr' ))
39
+ assert_equal( 25, ELEM.symbol_to_num( 'Mn' ))
40
+ assert_equal( 26, ELEM.symbol_to_num( 'Fe' ))
41
+ assert_equal( 27, ELEM.symbol_to_num( 'Co' ))
42
+ assert_equal( 28, ELEM.symbol_to_num( 'Ni' ))
43
+ assert_equal( 29, ELEM.symbol_to_num( 'Cu' ))
44
+ assert_equal( 30, ELEM.symbol_to_num( 'Zn' ))
45
+ assert_equal( 31, ELEM.symbol_to_num( 'Ga' ))
46
+ assert_equal( 32, ELEM.symbol_to_num( 'Ge' ))
47
+ assert_equal( 33, ELEM.symbol_to_num( 'As' ))
48
+ assert_equal( 34, ELEM.symbol_to_num( 'Se' ))
49
+ assert_equal( 35, ELEM.symbol_to_num( 'Br' ))
50
+ assert_equal( 36, ELEM.symbol_to_num( 'Kr' ))
51
+ assert_equal( 37, ELEM.symbol_to_num( 'Rb' ))
52
+ assert_equal( 38, ELEM.symbol_to_num( 'Sr' ))
53
+ assert_equal( 39, ELEM.symbol_to_num( 'Y' ))
54
+ assert_equal( 40, ELEM.symbol_to_num( 'Zr' ))
55
+ assert_equal( 41, ELEM.symbol_to_num( 'Nb' ))
56
+ assert_equal( 42, ELEM.symbol_to_num( 'Mo' ))
57
+ assert_equal( 43, ELEM.symbol_to_num( 'Tc' ))
58
+ assert_equal( 44, ELEM.symbol_to_num( 'Ru' ))
59
+ assert_equal( 45, ELEM.symbol_to_num( 'Rh' ))
60
+ assert_equal( 46, ELEM.symbol_to_num( 'Pd' ))
61
+ assert_equal( 47, ELEM.symbol_to_num( 'Ag' ))
62
+ assert_equal( 48, ELEM.symbol_to_num( 'Cd' ))
63
+ assert_equal( 49, ELEM.symbol_to_num( 'In' ))
64
+ assert_equal( 50, ELEM.symbol_to_num( 'Sn' ))
65
+ assert_equal( 51, ELEM.symbol_to_num( 'Sb' ))
66
+ assert_equal( 52, ELEM.symbol_to_num( 'Te' ))
67
+ assert_equal( 53, ELEM.symbol_to_num( 'I' ))
68
+ assert_equal( 54, ELEM.symbol_to_num( 'Xe' ))
69
+ assert_equal( 55, ELEM.symbol_to_num( 'Cs' ))
70
+ assert_equal( 56, ELEM.symbol_to_num( 'Ba' ))
71
+ assert_equal( 57, ELEM.symbol_to_num( 'La' ))
72
+ assert_equal( 58, ELEM.symbol_to_num( 'Ce' ))
73
+ assert_equal( 59, ELEM.symbol_to_num( 'Pr' ))
74
+ assert_equal( 60, ELEM.symbol_to_num( 'Nd' ))
75
+ assert_equal( 61, ELEM.symbol_to_num( 'Pm' ))
76
+ assert_equal( 62, ELEM.symbol_to_num( 'Sm' ))
77
+ assert_equal( 63, ELEM.symbol_to_num( 'Eu' ))
78
+ assert_equal( 64, ELEM.symbol_to_num( 'Gd' ))
79
+ assert_equal( 65, ELEM.symbol_to_num( 'Tb' ))
80
+ assert_equal( 66, ELEM.symbol_to_num( 'Dy' ))
81
+ assert_equal( 67, ELEM.symbol_to_num( 'Ho' ))
82
+ assert_equal( 68, ELEM.symbol_to_num( 'Er' ))
83
+ assert_equal( 69, ELEM.symbol_to_num( 'Tm' ))
84
+ assert_equal( 70, ELEM.symbol_to_num( 'Yb' ))
85
+ assert_equal( 71, ELEM.symbol_to_num( 'Lu' ))
86
+ assert_equal( 72, ELEM.symbol_to_num( 'Hf' ))
87
+ assert_equal( 73, ELEM.symbol_to_num( 'Ta' ))
88
+ assert_equal( 74, ELEM.symbol_to_num( 'W' ))
89
+ assert_equal( 75, ELEM.symbol_to_num( 'Re' ))
90
+ assert_equal( 76, ELEM.symbol_to_num( 'Os' ))
91
+ assert_equal( 77, ELEM.symbol_to_num( 'Ir' ))
92
+ assert_equal( 78, ELEM.symbol_to_num( 'Pt' ))
93
+ assert_equal( 79, ELEM.symbol_to_num( 'Au' ))
94
+ assert_equal( 80, ELEM.symbol_to_num( 'Hg' ))
95
+ assert_equal( 81, ELEM.symbol_to_num( 'Tl' ))
96
+ assert_equal( 82, ELEM.symbol_to_num( 'Pb' ))
97
+ assert_equal( 83, ELEM.symbol_to_num( 'Bi' ))
98
+ assert_equal( 84, ELEM.symbol_to_num( 'Po' ))
99
+ assert_equal( 85, ELEM.symbol_to_num( 'At' ))
100
+ assert_equal( 86, ELEM.symbol_to_num( 'Rn' ))
101
+ assert_equal( 87, ELEM.symbol_to_num( 'Fr' ))
102
+ assert_equal( 88, ELEM.symbol_to_num( 'Ra' ))
103
+ assert_equal( 89, ELEM.symbol_to_num( 'Ac' ))
104
+ assert_equal( 90, ELEM.symbol_to_num( 'Th' ))
105
+ assert_equal( 91, ELEM.symbol_to_num( 'Pa' ))
106
+ assert_equal( 92, ELEM.symbol_to_num( 'U' ))
107
+ assert_equal( 93, ELEM.symbol_to_num( 'Np' ))
108
+ assert_equal( 94, ELEM.symbol_to_num( 'Pu' ))
109
+ assert_equal( 95, ELEM.symbol_to_num( 'Am' ))
110
+ assert_equal( 96, ELEM.symbol_to_num( 'Cm' ))
111
+ assert_equal( 97, ELEM.symbol_to_num( 'Bk' ))
112
+ assert_equal( 98, ELEM.symbol_to_num( 'Cf' ))
113
+ assert_equal( 99, ELEM.symbol_to_num( 'Es' ))
114
+ assert_equal(100, ELEM.symbol_to_num( 'Fm' ))
115
+ assert_equal(101, ELEM.symbol_to_num( 'Md' ))
116
+ assert_equal(102, ELEM.symbol_to_num( 'No' ))
117
+ assert_equal(103, ELEM.symbol_to_num( 'Lr' ))
432
118
 
433
- assert_raise(RuntimeError){@e.getSymbol( nil )}
434
- assert_raise(RuntimeError){@e.getSymbol( 'A' )}
435
- assert_raise(RuntimeError){@e.getSymbol( -1 )}
436
- assert_raise(RuntimeError){@e.getSymbol( 0 )}
437
- assert_raise(RuntimeError){@e.getSymbol( 104 )}
438
- end
119
+ assert_raise(ELEM::NotExistError){ ELEM.symbol_to_num( 10 )}
120
+ assert_raise(ELEM::NotExistError){ ELEM.symbol_to_num( 104 )}
121
+ assert_raise(ELEM::NotExistError){ ELEM.symbol_to_num( 'A' )}
122
+ assert_raise(ELEM::NotExistError){ ELEM.symbol_to_num( nil )}
123
+ end
439
124
 
440
- def test_include?
441
- assert_equal(true, @e.include?( 'H' ))
442
- assert_equal(true, @e.include?( 'He' ))
443
- assert_equal(true, @e.include?( 'Li' ))
444
- assert_equal(true, @e.include?( 'Be' ))
445
- assert_equal(true, @e.include?( 'B' ))
446
- assert_equal(true, @e.include?( 'C' ))
447
- assert_equal(true, @e.include?( 'N' ))
448
- assert_equal(true, @e.include?( 'O' ))
449
- assert_equal(true, @e.include?( 'F' ))
450
- assert_equal(true, @e.include?( 'Ne' ))
451
- assert_equal(true, @e.include?( 'Na' ))
452
- assert_equal(true, @e.include?( 'Mg' ))
453
- assert_equal(true, @e.include?( 'Al' ))
454
- assert_equal(true, @e.include?( 'Si' ))
455
- assert_equal(true, @e.include?( 'P' ))
456
- assert_equal(true, @e.include?( 'S' ))
457
- assert_equal(true, @e.include?( 'Cl' ))
458
- assert_equal(true, @e.include?( 'Ar' ))
459
- assert_equal(true, @e.include?( 'K' ))
460
- assert_equal(true, @e.include?( 'Ca' ))
461
- assert_equal(true, @e.include?( 'Sc' ))
462
- assert_equal(true, @e.include?( 'Ti' ))
463
- assert_equal(true, @e.include?( 'V' ))
464
- assert_equal(true, @e.include?( 'Cr' ))
465
- assert_equal(true, @e.include?( 'Mn' ))
466
- assert_equal(true, @e.include?( 'Fe' ))
467
- assert_equal(true, @e.include?( 'Co' ))
468
- assert_equal(true, @e.include?( 'Ni' ))
469
- assert_equal(true, @e.include?( 'Cu' ))
470
- assert_equal(true, @e.include?( 'Zn' ))
471
- assert_equal(true, @e.include?( 'Ga' ))
472
- assert_equal(true, @e.include?( 'Ge' ))
473
- assert_equal(true, @e.include?( 'As' ))
474
- assert_equal(true, @e.include?( 'Se' ))
475
- assert_equal(true, @e.include?( 'Br' ))
476
- assert_equal(true, @e.include?( 'Kr' ))
477
- assert_equal(true, @e.include?( 'Rb' ))
478
- assert_equal(true, @e.include?( 'Sr' ))
479
- assert_equal(true, @e.include?( 'Y' ))
480
- assert_equal(true, @e.include?( 'Zr' ))
481
- assert_equal(true, @e.include?( 'Nb' ))
482
- assert_equal(true, @e.include?( 'Mo' ))
483
- assert_equal(true, @e.include?( 'Tc' ))
484
- assert_equal(true, @e.include?( 'Ru' ))
485
- assert_equal(true, @e.include?( 'Rh' ))
486
- assert_equal(true, @e.include?( 'Pd' ))
487
- assert_equal(true, @e.include?( 'Ag' ))
488
- assert_equal(true, @e.include?( 'Cd' ))
489
- assert_equal(true, @e.include?( 'In' ))
490
- assert_equal(true, @e.include?( 'Sn' ))
491
- assert_equal(true, @e.include?( 'Sb' ))
492
- assert_equal(true, @e.include?( 'Te' ))
493
- assert_equal(true, @e.include?( 'I' ))
494
- assert_equal(true, @e.include?( 'Xe' ))
495
- assert_equal(true, @e.include?( 'Cs' ))
496
- assert_equal(true, @e.include?( 'Ba' ))
497
- assert_equal(true, @e.include?( 'La' ))
498
- assert_equal(true, @e.include?( 'Ce' ))
499
- assert_equal(true, @e.include?( 'Pr' ))
500
- assert_equal(true, @e.include?( 'Nd' ))
501
- assert_equal(true, @e.include?( 'Pm' ))
502
- assert_equal(true, @e.include?( 'Sm' ))
503
- assert_equal(true, @e.include?( 'Eu' ))
504
- assert_equal(true, @e.include?( 'Gd' ))
505
- assert_equal(true, @e.include?( 'Tb' ))
506
- assert_equal(true, @e.include?( 'Dy' ))
507
- assert_equal(true, @e.include?( 'Ho' ))
508
- assert_equal(true, @e.include?( 'Er' ))
509
- assert_equal(true, @e.include?( 'Tm' ))
510
- assert_equal(true, @e.include?( 'Yb' ))
511
- assert_equal(true, @e.include?( 'Lu' ))
512
- assert_equal(true, @e.include?( 'Hf' ))
513
- assert_equal(true, @e.include?( 'Ta' ))
514
- assert_equal(true, @e.include?( 'W' ))
515
- assert_equal(true, @e.include?( 'Re' ))
516
- assert_equal(true, @e.include?( 'Os' ))
517
- assert_equal(true, @e.include?( 'Ir' ))
518
- assert_equal(true, @e.include?( 'Pt' ))
519
- assert_equal(true, @e.include?( 'Au' ))
520
- assert_equal(true, @e.include?( 'Hg' ))
521
- assert_equal(true, @e.include?( 'Tl' ))
522
- assert_equal(true, @e.include?( 'Pb' ))
523
- assert_equal(true, @e.include?( 'Bi' ))
524
- assert_equal(true, @e.include?( 'Po' ))
525
- assert_equal(true, @e.include?( 'At' ))
526
- assert_equal(true, @e.include?( 'Rn' ))
527
- assert_equal(true, @e.include?( 'Fr' ))
528
- assert_equal(true, @e.include?( 'Ra' ))
529
- assert_equal(true, @e.include?( 'Ac' ))
530
- assert_equal(true, @e.include?( 'Th' ))
531
- assert_equal(true, @e.include?( 'Pa' ))
532
- assert_equal(true, @e.include?( 'U' ))
533
- assert_equal(true, @e.include?( 'Np' ))
534
- assert_equal(true, @e.include?( 'Pu' ))
535
- assert_equal(true, @e.include?( 'Am' ))
536
- assert_equal(true, @e.include?( 'Cm' ))
537
- assert_equal(true, @e.include?( 'Bk' ))
538
- assert_equal(true, @e.include?( 'Cf' ))
539
- assert_equal(true, @e.include?( 'Es' ))
540
- assert_equal(true, @e.include?( 'Fm' ))
541
- assert_equal(true, @e.include?( 'Md' ))
542
- assert_equal(true, @e.include?( 'No' ))
543
- assert_equal(true, @e.include?( 'Lr' ))
544
- # assert_equal(true, @e.include?( 1 ))
545
- # assert_equal(true, @e.include?( 2 ))
546
- # assert_equal(true, @e.include?( 3 ))
547
- # assert_equal(true, @e.include?( 4 ))
548
- # assert_equal(true, @e.include?( 5 ))
549
- # assert_equal(true, @e.include?( 6 ))
550
- # assert_equal(true, @e.include?( 7 ))
551
- # assert_equal(true, @e.include?( 8 ))
552
- # assert_equal(true, @e.include?( 9 ))
553
- # assert_equal(true, @e.include?( 10 ))
554
- # assert_equal(true, @e.include?( 11 ))
555
- # assert_equal(true, @e.include?( 12 ))
556
- # assert_equal(true, @e.include?( 13 ))
557
- # assert_equal(true, @e.include?( 14 ))
558
- # assert_equal(true, @e.include?( 15 ))
559
- # assert_equal(true, @e.include?( 16 ))
560
- # assert_equal(true, @e.include?( 17 ))
561
- # assert_equal(true, @e.include?( 18 ))
562
- # assert_equal(true, @e.include?( 19 ))
563
- # assert_equal(true, @e.include?( 20 ))
564
- # assert_equal(true, @e.include?( 21 ))
565
- # assert_equal(true, @e.include?( 22 ))
566
- # assert_equal(true, @e.include?( 23 ))
567
- # assert_equal(true, @e.include?( 24 ))
568
- # assert_equal(true, @e.include?( 25 ))
569
- # assert_equal(true, @e.include?( 26 ))
570
- # assert_equal(true, @e.include?( 27 ))
571
- # assert_equal(true, @e.include?( 28 ))
572
- # assert_equal(true, @e.include?( 29 ))
573
- # assert_equal(true, @e.include?( 30 ))
574
- # assert_equal(true, @e.include?( 31 ))
575
- # assert_equal(true, @e.include?( 32 ))
576
- # assert_equal(true, @e.include?( 33 ))
577
- # assert_equal(true, @e.include?( 34 ))
578
- # assert_equal(true, @e.include?( 35 ))
579
- # assert_equal(true, @e.include?( 36 ))
580
- # assert_equal(true, @e.include?( 37 ))
581
- # assert_equal(true, @e.include?( 38 ))
582
- # assert_equal(true, @e.include?( 39 ))
583
- # assert_equal(true, @e.include?( 40 ))
584
- # assert_equal(true, @e.include?( 41 ))
585
- # assert_equal(true, @e.include?( 42 ))
586
- # assert_equal(true, @e.include?( 43 ))
587
- # assert_equal(true, @e.include?( 44 ))
588
- # assert_equal(true, @e.include?( 45 ))
589
- # assert_equal(true, @e.include?( 46 ))
590
- # assert_equal(true, @e.include?( 47 ))
591
- # assert_equal(true, @e.include?( 48 ))
592
- # assert_equal(true, @e.include?( 49 ))
593
- # assert_equal(true, @e.include?( 50 ))
594
- # assert_equal(true, @e.include?( 51 ))
595
- # assert_equal(true, @e.include?( 52 ))
596
- # assert_equal(true, @e.include?( 53 ))
597
- # assert_equal(true, @e.include?( 54 ))
598
- # assert_equal(true, @e.include?( 55 ))
599
- # assert_equal(true, @e.include?( 56 ))
600
- # assert_equal(true, @e.include?( 57 ))
601
- # assert_equal(true, @e.include?( 58 ))
602
- # assert_equal(true, @e.include?( 59 ))
603
- # assert_equal(true, @e.include?( 60 ))
604
- # assert_equal(true, @e.include?( 61 ))
605
- # assert_equal(true, @e.include?( 62 ))
606
- # assert_equal(true, @e.include?( 63 ))
607
- # assert_equal(true, @e.include?( 64 ))
608
- # assert_equal(true, @e.include?( 65 ))
609
- # assert_equal(true, @e.include?( 66 ))
610
- # assert_equal(true, @e.include?( 67 ))
611
- # assert_equal(true, @e.include?( 68 ))
612
- # assert_equal(true, @e.include?( 69 ))
613
- # assert_equal(true, @e.include?( 70 ))
614
- # assert_equal(true, @e.include?( 71 ))
615
- # assert_equal(true, @e.include?( 72 ))
616
- # assert_equal(true, @e.include?( 73 ))
617
- # assert_equal(true, @e.include?( 74 ))
618
- # assert_equal(true, @e.include?( 75 ))
619
- # assert_equal(true, @e.include?( 76 ))
620
- # assert_equal(true, @e.include?( 77 ))
621
- # assert_equal(true, @e.include?( 78 ))
622
- # assert_equal(true, @e.include?( 79 ))
623
- # assert_equal(true, @e.include?( 80 ))
624
- # assert_equal(true, @e.include?( 81 ))
625
- # assert_equal(true, @e.include?( 82 ))
626
- # assert_equal(true, @e.include?( 83 ))
627
- # assert_equal(true, @e.include?( 84 ))
628
- # assert_equal(true, @e.include?( 85 ))
629
- # assert_equal(true, @e.include?( 86 ))
630
- # assert_equal(true, @e.include?( 87 ))
631
- # assert_equal(true, @e.include?( 88 ))
632
- # assert_equal(true, @e.include?( 89 ))
633
- # assert_equal(true, @e.include?( 90 ))
634
- # assert_equal(true, @e.include?( 91 ))
635
- # assert_equal(true, @e.include?( 92 ))
636
- # assert_equal(true, @e.include?( 93 ))
637
- # assert_equal(true, @e.include?( 94 ))
638
- # assert_equal(true, @e.include?( 95 ))
639
- # assert_equal(true, @e.include?( 96 ))
640
- # assert_equal(true, @e.include?( 97 ))
641
- # assert_equal(true, @e.include?( 98 ))
642
- # assert_equal(true, @e.include?( 99 ))
643
- # assert_equal(true, @e.include?( 100 ))
644
- # assert_equal(true, @e.include?( 101 ))
645
- # assert_equal(true, @e.include?( 102 ))
646
- # assert_equal(true, @e.include?( 103 ))
125
+ def test_symbol
126
+ assert_equal('H' , ELEM.num_to_symbol( 1 ))
127
+ assert_equal('He', ELEM.num_to_symbol( 2 ))
128
+ assert_equal('Li', ELEM.num_to_symbol( 3 ))
129
+ assert_equal('Be', ELEM.num_to_symbol( 4 ))
130
+ assert_equal('B' , ELEM.num_to_symbol( 5 ))
131
+ assert_equal('C' , ELEM.num_to_symbol( 6 ))
132
+ assert_equal('N' , ELEM.num_to_symbol( 7 ))
133
+ assert_equal('O' , ELEM.num_to_symbol( 8 ))
134
+ assert_equal('F' , ELEM.num_to_symbol( 9 ))
135
+ assert_equal('Ne', ELEM.num_to_symbol( 10 ))
136
+ assert_equal('Na', ELEM.num_to_symbol( 11 ))
137
+ assert_equal('Mg', ELEM.num_to_symbol( 12 ))
138
+ assert_equal('Al', ELEM.num_to_symbol( 13 ))
139
+ assert_equal('Si', ELEM.num_to_symbol( 14 ))
140
+ assert_equal('P' , ELEM.num_to_symbol( 15 ))
141
+ assert_equal('S' , ELEM.num_to_symbol( 16 ))
142
+ assert_equal('Cl', ELEM.num_to_symbol( 17 ))
143
+ assert_equal('Ar', ELEM.num_to_symbol( 18 ))
144
+ assert_equal('K' , ELEM.num_to_symbol( 19 ))
145
+ assert_equal('Ca', ELEM.num_to_symbol( 20 ))
146
+ assert_equal('Sc', ELEM.num_to_symbol( 21 ))
147
+ assert_equal('Ti', ELEM.num_to_symbol( 22 ))
148
+ assert_equal('V' , ELEM.num_to_symbol( 23 ))
149
+ assert_equal('Cr', ELEM.num_to_symbol( 24 ))
150
+ assert_equal('Mn', ELEM.num_to_symbol( 25 ))
151
+ assert_equal('Fe', ELEM.num_to_symbol( 26 ))
152
+ assert_equal('Co', ELEM.num_to_symbol( 27 ))
153
+ assert_equal('Ni', ELEM.num_to_symbol( 28 ))
154
+ assert_equal('Cu', ELEM.num_to_symbol( 29 ))
155
+ assert_equal('Zn', ELEM.num_to_symbol( 30 ))
156
+ assert_equal('Ga', ELEM.num_to_symbol( 31 ))
157
+ assert_equal('Ge', ELEM.num_to_symbol( 32 ))
158
+ assert_equal('As', ELEM.num_to_symbol( 33 ))
159
+ assert_equal('Se', ELEM.num_to_symbol( 34 ))
160
+ assert_equal('Br', ELEM.num_to_symbol( 35 ))
161
+ assert_equal('Kr', ELEM.num_to_symbol( 36 ))
162
+ assert_equal('Rb', ELEM.num_to_symbol( 37 ))
163
+ assert_equal('Sr', ELEM.num_to_symbol( 38 ))
164
+ assert_equal('Y' , ELEM.num_to_symbol( 39 ))
165
+ assert_equal('Zr', ELEM.num_to_symbol( 40 ))
166
+ assert_equal('Nb', ELEM.num_to_symbol( 41 ))
167
+ assert_equal('Mo', ELEM.num_to_symbol( 42 ))
168
+ assert_equal('Tc', ELEM.num_to_symbol( 43 ))
169
+ assert_equal('Ru', ELEM.num_to_symbol( 44 ))
170
+ assert_equal('Rh', ELEM.num_to_symbol( 45 ))
171
+ assert_equal('Pd', ELEM.num_to_symbol( 46 ))
172
+ assert_equal('Ag', ELEM.num_to_symbol( 47 ))
173
+ assert_equal('Cd', ELEM.num_to_symbol( 48 ))
174
+ assert_equal('In', ELEM.num_to_symbol( 49 ))
175
+ assert_equal('Sn', ELEM.num_to_symbol( 50 ))
176
+ assert_equal('Sb', ELEM.num_to_symbol( 51 ))
177
+ assert_equal('Te', ELEM.num_to_symbol( 52 ))
178
+ assert_equal('I' , ELEM.num_to_symbol( 53 ))
179
+ assert_equal('Xe', ELEM.num_to_symbol( 54 ))
180
+ assert_equal('Cs', ELEM.num_to_symbol( 55 ))
181
+ assert_equal('Ba', ELEM.num_to_symbol( 56 ))
182
+ assert_equal('La', ELEM.num_to_symbol( 57 ))
183
+ assert_equal('Ce', ELEM.num_to_symbol( 58 ))
184
+ assert_equal('Pr', ELEM.num_to_symbol( 59 ))
185
+ assert_equal('Nd', ELEM.num_to_symbol( 60 ))
186
+ assert_equal('Pm', ELEM.num_to_symbol( 61 ))
187
+ assert_equal('Sm', ELEM.num_to_symbol( 62 ))
188
+ assert_equal('Eu', ELEM.num_to_symbol( 63 ))
189
+ assert_equal('Gd', ELEM.num_to_symbol( 64 ))
190
+ assert_equal('Tb', ELEM.num_to_symbol( 65 ))
191
+ assert_equal('Dy', ELEM.num_to_symbol( 66 ))
192
+ assert_equal('Ho', ELEM.num_to_symbol( 67 ))
193
+ assert_equal('Er', ELEM.num_to_symbol( 68 ))
194
+ assert_equal('Tm', ELEM.num_to_symbol( 69 ))
195
+ assert_equal('Yb', ELEM.num_to_symbol( 70 ))
196
+ assert_equal('Lu', ELEM.num_to_symbol( 71 ))
197
+ assert_equal('Hf', ELEM.num_to_symbol( 72 ))
198
+ assert_equal('Ta', ELEM.num_to_symbol( 73 ))
199
+ assert_equal('W' , ELEM.num_to_symbol( 74 ))
200
+ assert_equal('Re', ELEM.num_to_symbol( 75 ))
201
+ assert_equal('Os', ELEM.num_to_symbol( 76 ))
202
+ assert_equal('Ir', ELEM.num_to_symbol( 77 ))
203
+ assert_equal('Pt', ELEM.num_to_symbol( 78 ))
204
+ assert_equal('Au', ELEM.num_to_symbol( 79 ))
205
+ assert_equal('Hg', ELEM.num_to_symbol( 80 ))
206
+ assert_equal('Tl', ELEM.num_to_symbol( 81 ))
207
+ assert_equal('Pb', ELEM.num_to_symbol( 82 ))
208
+ assert_equal('Bi', ELEM.num_to_symbol( 83 ))
209
+ assert_equal('Po', ELEM.num_to_symbol( 84 ))
210
+ assert_equal('At', ELEM.num_to_symbol( 85 ))
211
+ assert_equal('Rn', ELEM.num_to_symbol( 86 ))
212
+ assert_equal('Fr', ELEM.num_to_symbol( 87 ))
213
+ assert_equal('Ra', ELEM.num_to_symbol( 88 ))
214
+ assert_equal('Ac', ELEM.num_to_symbol( 89 ))
215
+ assert_equal('Th', ELEM.num_to_symbol( 90 ))
216
+ assert_equal('Pa', ELEM.num_to_symbol( 91 ))
217
+ assert_equal('U' , ELEM.num_to_symbol( 92 ))
218
+ assert_equal('Np', ELEM.num_to_symbol( 93 ))
219
+ assert_equal('Pu', ELEM.num_to_symbol( 94 ))
220
+ assert_equal('Am', ELEM.num_to_symbol( 95 ))
221
+ assert_equal('Cm', ELEM.num_to_symbol( 96 ))
222
+ assert_equal('Bk', ELEM.num_to_symbol( 97 ))
223
+ assert_equal('Cf', ELEM.num_to_symbol( 98 ))
224
+ assert_equal('Es', ELEM.num_to_symbol( 99 ))
225
+ assert_equal('Fm', ELEM.num_to_symbol( 100 ))
226
+ assert_equal('Md', ELEM.num_to_symbol( 101 ))
227
+ assert_equal('No', ELEM.num_to_symbol( 102 ))
228
+ assert_equal('Lr', ELEM.num_to_symbol( 103 ))
647
229
 
648
- assert_equal(false, @e.include?( nil ))
649
- assert_equal(false, @e.include?( 'A' ))
650
- assert_equal(false, @e.include?( -1 ))
651
- assert_equal(false, @e.include?( 0 ))
652
- assert_equal(false, @e.include?( 104 ))
653
- end
230
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( 'H' )}
231
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( 'Na' )}
232
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( nil )}
233
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( 'A' )}
234
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( -1 )}
235
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( 0 )}
236
+ assert_raise(ELEM::NotExistError){ELEM.num_to_symbol( 104 )}
237
+ end
238
+
239
+ def test_atomic_radius
240
+ assert_equal(0.53, ELEM.atomic_radius(1 ))
241
+ assert_equal(0.31, ELEM.atomic_radius(2 ))
242
+ assert_equal(1.67, ELEM.atomic_radius(3 ))
243
+ assert_equal(1.12, ELEM.atomic_radius(4 ))
244
+ assert_equal(0.87, ELEM.atomic_radius(5 ))
245
+ assert_equal(0.67, ELEM.atomic_radius(6 ))
246
+ assert_equal(0.56, ELEM.atomic_radius(7 ))
247
+ assert_equal(0.48, ELEM.atomic_radius(8 ))
248
+ assert_equal(0.42, ELEM.atomic_radius(9 ))
249
+ assert_equal(0.38, ELEM.atomic_radius(10))
250
+ assert_equal(1.90, ELEM.atomic_radius(11))
251
+ assert_equal(1.45, ELEM.atomic_radius(12))
252
+ assert_equal(1.18, ELEM.atomic_radius(13))
253
+ assert_equal(1.11, ELEM.atomic_radius(14))
254
+ assert_equal(0.98, ELEM.atomic_radius(15))
255
+ assert_equal(0.88, ELEM.atomic_radius(16))
256
+ assert_equal(0.79, ELEM.atomic_radius(17))
257
+ assert_equal(0.71, ELEM.atomic_radius(18))
258
+ assert_equal(2.43, ELEM.atomic_radius(19))
259
+ assert_equal(1.94, ELEM.atomic_radius(20))
260
+ assert_equal(1.84, ELEM.atomic_radius(21))
261
+ assert_equal(1.76, ELEM.atomic_radius(22))
262
+ assert_equal(1.71, ELEM.atomic_radius(23))
263
+ assert_equal(1.66, ELEM.atomic_radius(24))
264
+ assert_equal(1.61, ELEM.atomic_radius(25))
265
+ assert_equal(1.56, ELEM.atomic_radius(26))
266
+ assert_equal(1.52, ELEM.atomic_radius(27))
267
+ assert_equal(1.49, ELEM.atomic_radius(28))
268
+ assert_equal(1.45, ELEM.atomic_radius(29))
269
+ assert_equal(1.42, ELEM.atomic_radius(30))
270
+ assert_equal(1.36, ELEM.atomic_radius(31))
271
+ assert_equal(1.25, ELEM.atomic_radius(32))
272
+ assert_equal(1.14, ELEM.atomic_radius(33))
273
+ assert_equal(1.03, ELEM.atomic_radius(34))
274
+ assert_equal(0.94, ELEM.atomic_radius(35))
275
+ assert_equal(0.88, ELEM.atomic_radius(36))
276
+ assert_equal(2.65, ELEM.atomic_radius(37))
277
+ assert_equal(2.19, ELEM.atomic_radius(38))
278
+ assert_equal(2.12, ELEM.atomic_radius(39))
279
+ assert_equal(2.06, ELEM.atomic_radius(40))
280
+ assert_equal(1.98, ELEM.atomic_radius(41))
281
+ assert_equal(1.90, ELEM.atomic_radius(42))
282
+ assert_equal(1.83, ELEM.atomic_radius(43))
283
+ assert_equal(1.78, ELEM.atomic_radius(44))
284
+ assert_equal(1.73, ELEM.atomic_radius(45))
285
+ assert_equal(1.69, ELEM.atomic_radius(46))
286
+ assert_equal(1.65, ELEM.atomic_radius(47))
287
+ assert_equal(1.61, ELEM.atomic_radius(48))
288
+ assert_equal(1.56, ELEM.atomic_radius(49))
289
+ assert_equal(1.45, ELEM.atomic_radius(50))
290
+ assert_equal(1.33, ELEM.atomic_radius(51))
291
+ assert_equal(1.23, ELEM.atomic_radius(52))
292
+ assert_equal(1.15, ELEM.atomic_radius(53))
293
+ assert_equal(1.08, ELEM.atomic_radius(54))
294
+ assert_equal(2.98, ELEM.atomic_radius(55))
295
+ assert_equal(2.53, ELEM.atomic_radius(56))
296
+ assert_equal(1.95, ELEM.atomic_radius(57))
297
+ assert_equal(1.85, ELEM.atomic_radius(58))
298
+ assert_equal(2.47, ELEM.atomic_radius(59))
299
+ assert_equal(2.06, ELEM.atomic_radius(60))
300
+ assert_equal(2.05, ELEM.atomic_radius(61))
301
+ assert_equal(2.38, ELEM.atomic_radius(62))
302
+ assert_equal(2.31, ELEM.atomic_radius(63))
303
+ assert_equal(2.33, ELEM.atomic_radius(64))
304
+ assert_equal(2.25, ELEM.atomic_radius(65))
305
+ assert_equal(2.28, ELEM.atomic_radius(66))
306
+ assert_equal(2.26, ELEM.atomic_radius(67))
307
+ assert_equal(2.26, ELEM.atomic_radius(68))
308
+ assert_equal(2.22, ELEM.atomic_radius(69))
309
+ assert_equal(2.22, ELEM.atomic_radius(70))
310
+ assert_equal(2.17, ELEM.atomic_radius(71))
311
+ assert_equal(2.08, ELEM.atomic_radius(72))
312
+ assert_equal(2.00, ELEM.atomic_radius(73))
313
+ assert_equal(1.93, ELEM.atomic_radius(74))
314
+ assert_equal(1.88, ELEM.atomic_radius(75))
315
+ assert_equal(1.85, ELEM.atomic_radius(76))
316
+ assert_equal(1.80, ELEM.atomic_radius(77))
317
+ assert_equal(1.77, ELEM.atomic_radius(78))
318
+ assert_equal(1.74, ELEM.atomic_radius(79))
319
+ assert_equal(1.71, ELEM.atomic_radius(80))
320
+ assert_equal(1.56, ELEM.atomic_radius(81))
321
+ assert_equal(1.54, ELEM.atomic_radius(82))
322
+ assert_equal(1.43, ELEM.atomic_radius(83))
323
+ assert_equal(1.35, ELEM.atomic_radius(84))
324
+ assert_equal(1.27, ELEM.atomic_radius(85))
325
+ assert_equal(1.20, ELEM.atomic_radius(86))
326
+ assert_equal(nil , ELEM.atomic_radius(87))
327
+ assert_equal(nil , ELEM.atomic_radius(88))
328
+ assert_equal(1.95, ELEM.atomic_radius(89))
329
+ assert_equal(1.80, ELEM.atomic_radius(90))
330
+ assert_equal(1.80, ELEM.atomic_radius(91))
331
+ assert_equal(1.75, ELEM.atomic_radius(92))
332
+ assert_equal(1.75, ELEM.atomic_radius(93))
333
+ assert_equal(1.75, ELEM.atomic_radius(94))
334
+ assert_equal(1.75, ELEM.atomic_radius(95))
335
+ assert_equal(nil , ELEM.atomic_radius(96))
336
+
337
+ assert_equal(0.53, ELEM.atomic_radius('H' ))
338
+ assert_equal(0.31, ELEM.atomic_radius('He'))
339
+ assert_equal(1.67, ELEM.atomic_radius('Li'))
340
+ assert_equal(1.12, ELEM.atomic_radius('Be'))
341
+ assert_equal(0.87, ELEM.atomic_radius('B' ))
342
+ assert_equal(0.67, ELEM.atomic_radius('C' ))
343
+ assert_equal(0.56, ELEM.atomic_radius('N' ))
344
+ assert_equal(0.48, ELEM.atomic_radius('O' ))
345
+ assert_equal(0.42, ELEM.atomic_radius('F' ))
346
+ assert_equal(0.38, ELEM.atomic_radius('Ne'))
347
+ assert_equal(1.90, ELEM.atomic_radius('Na'))
348
+ assert_equal(1.45, ELEM.atomic_radius('Mg'))
349
+ assert_equal(1.18, ELEM.atomic_radius('Al'))
350
+ assert_equal(1.11, ELEM.atomic_radius('Si'))
351
+ assert_equal(0.98, ELEM.atomic_radius('P' ))
352
+ assert_equal(0.88, ELEM.atomic_radius('S' ))
353
+ assert_equal(0.79, ELEM.atomic_radius('Cl'))
354
+ assert_equal(0.71, ELEM.atomic_radius('Ar'))
355
+ assert_equal(2.43, ELEM.atomic_radius('K' ))
356
+ assert_equal(1.94, ELEM.atomic_radius('Ca'))
357
+ assert_equal(1.84, ELEM.atomic_radius('Sc'))
358
+ assert_equal(1.76, ELEM.atomic_radius('Ti'))
359
+ assert_equal(1.71, ELEM.atomic_radius('V' ))
360
+ assert_equal(1.66, ELEM.atomic_radius('Cr'))
361
+ assert_equal(1.61, ELEM.atomic_radius('Mn'))
362
+ assert_equal(1.56, ELEM.atomic_radius('Fe'))
363
+ assert_equal(1.52, ELEM.atomic_radius('Co'))
364
+ assert_equal(1.49, ELEM.atomic_radius('Ni'))
365
+ assert_equal(1.45, ELEM.atomic_radius('Cu'))
366
+ assert_equal(1.42, ELEM.atomic_radius('Zn'))
367
+ assert_equal(1.36, ELEM.atomic_radius('Ga'))
368
+ assert_equal(1.25, ELEM.atomic_radius('Ge'))
369
+ assert_equal(1.14, ELEM.atomic_radius('As'))
370
+ assert_equal(1.03, ELEM.atomic_radius('Se'))
371
+ assert_equal(0.94, ELEM.atomic_radius('Br'))
372
+ assert_equal(0.88, ELEM.atomic_radius('Kr'))
373
+ assert_equal(2.65, ELEM.atomic_radius('Rb'))
374
+ assert_equal(2.19, ELEM.atomic_radius('Sr'))
375
+ assert_equal(2.12, ELEM.atomic_radius('Y' ))
376
+ assert_equal(2.06, ELEM.atomic_radius('Zr'))
377
+ assert_equal(1.98, ELEM.atomic_radius('Nb'))
378
+ assert_equal(1.90, ELEM.atomic_radius('Mo'))
379
+ assert_equal(1.83, ELEM.atomic_radius('Tc'))
380
+ assert_equal(1.78, ELEM.atomic_radius('Ru'))
381
+ assert_equal(1.73, ELEM.atomic_radius('Rh'))
382
+ assert_equal(1.69, ELEM.atomic_radius('Pd'))
383
+ assert_equal(1.65, ELEM.atomic_radius('Ag'))
384
+ assert_equal(1.61, ELEM.atomic_radius('Cd'))
385
+ assert_equal(1.56, ELEM.atomic_radius('In'))
386
+ assert_equal(1.45, ELEM.atomic_radius('Sn'))
387
+ assert_equal(1.33, ELEM.atomic_radius('Sb'))
388
+ assert_equal(1.23, ELEM.atomic_radius('Te'))
389
+ assert_equal(1.15, ELEM.atomic_radius('I' ))
390
+ assert_equal(1.08, ELEM.atomic_radius('Xe'))
391
+ assert_equal(2.98, ELEM.atomic_radius('Cs'))
392
+ assert_equal(2.53, ELEM.atomic_radius('Ba'))
393
+ assert_equal(1.95, ELEM.atomic_radius('La'))
394
+ assert_equal(1.85, ELEM.atomic_radius('Ce'))
395
+ assert_equal(2.47, ELEM.atomic_radius('Pr'))
396
+ assert_equal(2.06, ELEM.atomic_radius('Nd'))
397
+ assert_equal(2.05, ELEM.atomic_radius('Pm'))
398
+ assert_equal(2.38, ELEM.atomic_radius('Sm'))
399
+ assert_equal(2.31, ELEM.atomic_radius('Eu'))
400
+ assert_equal(2.33, ELEM.atomic_radius('Gd'))
401
+ assert_equal(2.25, ELEM.atomic_radius('Tb'))
402
+ assert_equal(2.28, ELEM.atomic_radius('Dy'))
403
+ assert_equal(2.26, ELEM.atomic_radius('Ho'))
404
+ assert_equal(2.26, ELEM.atomic_radius('Er'))
405
+ assert_equal(2.22, ELEM.atomic_radius('Tm'))
406
+ assert_equal(2.22, ELEM.atomic_radius('Yb'))
407
+ assert_equal(2.17, ELEM.atomic_radius('Lu'))
408
+ assert_equal(2.08, ELEM.atomic_radius('Hf'))
409
+ assert_equal(2.00, ELEM.atomic_radius('Ta'))
410
+ assert_equal(1.93, ELEM.atomic_radius('W' ))
411
+ assert_equal(1.88, ELEM.atomic_radius('Re'))
412
+ assert_equal(1.85, ELEM.atomic_radius('Os'))
413
+ assert_equal(1.80, ELEM.atomic_radius('Ir'))
414
+ assert_equal(1.77, ELEM.atomic_radius('Pt'))
415
+ assert_equal(1.74, ELEM.atomic_radius('Au'))
416
+ assert_equal(1.71, ELEM.atomic_radius('Hg'))
417
+ assert_equal(1.56, ELEM.atomic_radius('Tl'))
418
+ assert_equal(1.54, ELEM.atomic_radius('Pb'))
419
+ assert_equal(1.43, ELEM.atomic_radius('Bi'))
420
+ assert_equal(1.35, ELEM.atomic_radius('Po'))
421
+ assert_equal(1.27, ELEM.atomic_radius('At'))
422
+ assert_equal(1.20, ELEM.atomic_radius('Rn'))
423
+ assert_equal(nil , ELEM.atomic_radius('Fr'))
424
+ assert_equal(nil , ELEM.atomic_radius('Ra'))
425
+ assert_equal(1.95, ELEM.atomic_radius('Ac'))
426
+ assert_equal(1.80, ELEM.atomic_radius('Th'))
427
+ assert_equal(1.80, ELEM.atomic_radius('Pa'))
428
+ assert_equal(1.75, ELEM.atomic_radius('U' ))
429
+ assert_equal(1.75, ELEM.atomic_radius('Np'))
430
+ assert_equal(1.75, ELEM.atomic_radius('Pu'))
431
+ assert_equal(1.75, ELEM.atomic_radius('Am'))
432
+ assert_equal(nil , ELEM.atomic_radius('Cm'))
433
+ end
654
434
  end
655
435