SBCS.cxx 465 B

12345678910111213141516171819202122
  1. // Test to verify that _SBCS being defined causes CharacterSet to be set to 0 (Single Byte Character Set)
  2. int main ()
  3. {
  4. #ifdef _UNICODE
  5. bool UnicodeSet=true;
  6. #else
  7. bool UnicodeSet=false;
  8. #endif
  9. #ifdef _MBCS
  10. bool MBCSSet=true;
  11. #else
  12. bool MBCSSet=false;
  13. #endif
  14. // if neither _UNICODE nor _MBCS is set, CharacterSet must be set to SBCS.
  15. bool SBCSSet=(!UnicodeSet && !MBCSSet);
  16. // Reverse boolean to indicate error case correctly
  17. return !SBCSSet;
  18. }