Add missing primitive constraints and their tests.