| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * | 3 * |
| 4 * Copyright (C) 2005-2009, International Business Machines | 4 * Copyright (C) 2005-2014, International Business Machines |
| 5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
| 6 * | 6 * |
| 7 ******************************************************************************* | 7 ******************************************************************************* |
| 8 * | 8 * |
| 9 * created on: 2005jun15 | 9 * created on: 2005jun15 |
| 10 * created by: Raymond Yang | 10 * created by: Raymond Yang |
| 11 */ | 11 */ |
| 12 | 12 |
| 13 #if !UCONFIG_NO_IDNA | 13 #if !UCONFIG_NO_IDNA |
| 14 | 14 |
| 15 #include <stdio.h> | 15 #include <stdio.h> |
| 16 #include <stdlib.h> | 16 #include <stdlib.h> |
| 17 #include <string.h> | 17 #include <string.h> |
| 18 #include "unicode/utypes.h" | 18 #include "unicode/utypes.h" |
| 19 #include "unicode/ucnv.h" | 19 #include "unicode/ucnv.h" |
| 20 #include "unicode/ustring.h" | 20 #include "unicode/ustring.h" |
| 21 #include "unicode/uidna.h" | 21 #include "unicode/uidna.h" |
| 22 | 22 |
| 23 #include "idnaconf.h" | 23 #include "idnaconf.h" |
| 24 | 24 |
| 25 static const UChar C_TAG[] = {0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0}; // ===== | 25 static const UChar C_TAG[] = {0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0}; // ===== |
| 26 static const UChar C_NAMEZONE[] = {0x6E, 0x61, 0x6D, 0x65, 0x7A, 0x6F, 0x6E, 0x6
5, 0}; // namezone | 26 static const UChar C_NAMEZONE[] = {0x6E, 0x61, 0x6D, 0x65, 0x7A, 0x6F, 0x6E, 0x6
5, 0}; // namezone |
| 27 static const UChar C_NAMEBASE[] = {0x6E, 0x61, 0x6D, 0x65, 0x62, 0x61, 0x73, 0x6
5, 0}; // namebase | 27 static const UChar C_NAMEBASE[] = {0x6E, 0x61, 0x6D, 0x65, 0x62, 0x61, 0x73, 0x6
5, 0}; // namebase |
| 28 static const UChar C_NAMEUTF8[] = {0x6E, 0x61, 0x6D, 0x65, 0x75, 0x74, 0x66, 0x3
8, 0}; // nameutf8 | |
| 29 | 28 |
| 30 static const UChar C_TYPE[] = {0x74, 0x79, 0x70, 0x65, 0}; // type | 29 static const UChar C_TYPE[] = {0x74, 0x79, 0x70, 0x65, 0}; // type |
| 31 static const UChar C_TOASCII[] = {0x74, 0x6F, 0x61, 0x73, 0x63, 0x69, 0x69, 0}
; // toascii | 30 static const UChar C_TOASCII[] = {0x74, 0x6F, 0x61, 0x73, 0x63, 0x69, 0x69, 0}
; // toascii |
| 32 static const UChar C_TOUNICODE[] = {0x74, 0x6F, 0x75, 0x6E, 0x69, 0x63, 0x6F, 0x
64, 0x65, 0}; // tounicode | 31 static const UChar C_TOUNICODE[] = {0x74, 0x6F, 0x75, 0x6E, 0x69, 0x63, 0x6F, 0x
64, 0x65, 0}; // tounicode |
| 33 | 32 |
| 34 static const UChar C_PASSFAIL[] = {0x70, 0x61, 0x73, 0x73, 0x66, 0x61, 0x69, 0x6
C, 0}; // passfail | 33 static const UChar C_PASSFAIL[] = {0x70, 0x61, 0x73, 0x73, 0x66, 0x61, 0x69, 0x6
C, 0}; // passfail |
| 35 static const UChar C_PASS[] = {0x70, 0x61, 0x73, 0x73, 0}; // pass | 34 static const UChar C_PASS[] = {0x70, 0x61, 0x73, 0x73, 0}; // pass |
| 36 static const UChar C_FAIL[] = {0x66, 0x61, 0x69, 0x6C, 0}; // fail | 35 static const UChar C_FAIL[] = {0x66, 0x61, 0x69, 0x6C, 0}; // fail |
| 37 | 36 |
| 38 static const UChar C_DESC[] = {0x64, 0x65, 0x73, 0x63, 0}; // desc | 37 static const UChar C_DESC[] = {0x64, 0x65, 0x73, 0x63, 0}; // desc |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 #endif | 343 #endif |
| 345 | 344 |
| 346 void IdnaConfTest::runIndexedTest( int32_t index, UBool exec, const char* &name,
char* /*par*/){ | 345 void IdnaConfTest::runIndexedTest( int32_t index, UBool exec, const char* &name,
char* /*par*/){ |
| 347 switch (index) { | 346 switch (index) { |
| 348 TESTCASE(0,Test); | 347 TESTCASE(0,Test); |
| 349 default: name = ""; break; | 348 default: name = ""; break; |
| 350 } | 349 } |
| 351 } | 350 } |
| 352 | 351 |
| 353 #endif | 352 #endif |
| OLD | NEW |