# Sources for the hard coded data below:
# - https://en.wikipedia.org/wiki/Tungsten
# - https://en.wikipedia.org/wiki/Chlorine
# - https://en.wikipedia.org/wiki/Rubidium
# - https://en.wikipedia.org/wiki/Electron_affinity_(data_page)
# - https://en.wikipedia.org/wiki/Ionization_energies_of_the_elements_(data_page)
# - https://en.wikipedia.org/wiki/Enthalpy_of_vaporization

let w = element("tungsten")
assert(w.symbol == "W")
assert(w.name == "Tungsten")
assert_eq(w.atomic_number, 74)
assert_eq(w.group, 6)
assert_eq(w.period, 6)
assert_eq(w.melting_point, 3695 K, 20 K)
# assert_eq(w.boiling_point, 6203 K, 20 K)     # <-- this seems to be wrong in the `mendeleev` crate
assert_eq(w.density, 19.25 g/cm³, 0.1 g/cm³)
assert_eq(w.electron_affinity, 0.816 eV, 0.01 eV)
assert_eq(w.ionization_energy, 7.8640 eV, 0.2 eV)
assert_eq(w.vaporization_heat, 807 kJ/mol, 20 kJ/mol)


let chl = element("chlorine")
assert(chl.symbol == "Cl")
assert(chl.name == "Chlorine")
assert_eq(chl.atomic_number, 17)
assert_eq(chl.group, 17)
assert_eq(chl.period, 3)
assert_eq(chl.melting_point, 171.6 K, 1 K)
assert_eq(chl.boiling_point, 239.11 K, 1 K)
assert_eq(chl.density, 3.2 g/L, 0.1 g/L)
assert_eq(chl.electron_affinity, 3.612 eV, 0.01 eV)
assert_eq(chl.ionization_energy, 12.96764 eV, 0.01 eV)
assert_eq(chl.vaporization_heat, 20.4 kJ/mol, 0.1 kJ/mol)


let rb = element("rubidium")
assert(rb.symbol == "Rb")
assert(rb.name == "Rubidium")
assert_eq(rb.atomic_number, 37)
assert_eq(rb.group, 1)
assert_eq(rb.period, 5)
assert_eq(rb.melting_point, 312.45 K, 0.3 K)
assert_eq(rb.boiling_point, 961 K, 0.3 K)
assert_eq(rb.density, 1.534 g/cm³, 0.01 g/cm³)
assert_eq(rb.electron_affinity, 0.485 eV, 0.02 eV)
assert_eq(rb.ionization_energy, 4.1771 eV, 0.01 eV)
assert_eq(rb.vaporization_heat, 75.8 kJ/mol, 0.1 kJ/mol)
