summaryrefslogtreecommitdiffstats
path: root/Tests/FindICU/Test/main.cpp
blob: 73c3ee15155816e486af8532f09e307194bf687c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <unicode/utypes.h>
#include <unicode/ustring.h>
#include <unicode/uclean.h>

#include <unicode/ucnv.h>
#include <unicode/udat.h>
#include <unicode/ucal.h>

int
main()
{
  UConverter *cnv = 0;
  UErrorCode status = U_ZERO_ERROR;
  ucnv_open(NULL, &status);

  UChar uchars[100];
  const char *chars = "Test";
  if(cnv&&U_SUCCESS(status)) {
    int32_t len = ucnv_toUChars(cnv, uchars, 100, chars, -1, &status);
  }

  ucnv_close(cnv);
  u_cleanup();
  return (U_FAILURE(status) ? 1 : 0);
}