Skip to content

Commit

Permalink
Revert test.c to mainline
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Aug 18, 2021
1 parent ad61c75 commit e997295
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ffi/capi/examples/fixeddecimal/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
#include <stdio.h>

int main() {
ICU4XLocale* locale = ICU4XLocale_create_bn();
ICU4XCreateStaticDataProviderResult result = ICU4XStaticDataProvider_create();
ICU4XLocale* locale = ICU4XLocale_create("bn", 2);
ICU4XCreateDataProviderResult result = ICU4XDataProvider_create_static();
if (!result.success) {
printf("Failed to create FsDataProvider\n");
return 1;
}
ICU4XStaticDataProvider* provider = result.provider;
ICU4XDataProvider* provider = result.provider;
ICU4XFixedDecimal* decimal = ICU4XFixedDecimal_create(1000007);

ICU4XFixedDecimalFormatOptions opts = {ICU4XFixedDecimalGroupingStrategy_Auto, ICU4XFixedDecimalSignDisplay_Auto};

ICU4XFixedDecimalFormatResult fdf_result = ICU4XFixedDecimalFormat_try_new_from_static(locale, provider, opts);
ICU4XFixedDecimalFormatResult fdf_result = ICU4XFixedDecimalFormat_try_new(locale, provider, opts);
if (!fdf_result.success) {
printf("Failed to create FixedDecimalFormat\n");
return 1;
Expand Down Expand Up @@ -91,7 +91,7 @@ int main() {
ICU4XFixedDecimal_destroy(decimal);
ICU4XFixedDecimalFormat_destroy(fdf);
ICU4XLocale_destroy(locale);
ICU4XStaticDataProvider_destroy(provider);
ICU4XDataProvider_destroy(provider);

return 0;
}

0 comments on commit e997295

Please sign in to comment.