A method for testing and improving molecular constants of diatomic molecules with special reference to Br2 1(g