Fixing warnings issues by clang++ compiler and adding more sorting tests.