Skip to content

[wasm] improve Wasm.Build.Tests to expect System.Globalization.CultureNotFoundException #55838

@pavelsavara

Description

@pavelsavara

This change is possibly hiding other issues.
8c503e1

  • It would be better to catch explicitly System.Globalization.CultureNotFoundException in appropriate scenarios.
  • Also, it would be great to cover behaviour of PredefinedCulturesOnly flag in linker.

This is exception I observed when I reverted the linked change

[wasm test-browser] fail: Error: System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
[wasm test-browser] es-ES is an invalid culture identifier.
[wasm test-browser]    at System.Globalization.CultureInfo..ctor(String , Boolean ) in System.Private.CoreLib.dll:token 0x6000fed+0x1f
[wasm test-browser]    at TestClass.Main() in invariant_True.dll:token 0x6000001+0x1
[wasm test-browser]     at Object._convert_exception_for_method_call (http://127.0.0.1:64656/dotnet.js:1:175823)
[wasm test-browser]     at Object._handle_exception_for_call (http://127.0.0.1:64656/dotnet.js:1:177792)
[wasm test-browser]     at Object._handle_exception_and_produce_result_for_call (http://127.0.0.1:64656/dotnet.js:1:178113)
[wasm test-browser]     at Object._call_method_with_converted_args (http://127.0.0.1:64656/dotnet.js:1:179187)
[wasm test-browser]     at Object.call_method (http://127.0.0.1:64656/dotnet.js:1:177582)
[wasm test-browser]     at http://127.0.0.1:64656/dotnet.js:1:185292
[wasm test-browser]     at Object.call_assembly_entry_point (http://127.0.0.1:64656/dotnet.js:1:185525)
[wasm test-browser]     at Object.init (http://127.0.0.1:64656/runtime.js:356:24)
[wasm test-browser]     at Object.Module.config.loaded_cb (http://127.0.0.1:64656/runtime.js:243:8)
[wasm test-browser]     at Object._finalize_startup (http://127.0.0.1:64656/dotnet.js:1:136358)
[wasm test-browser] info: WASM EXIT 1
[wasm test-browser] fail: Application has finished with exit code TESTS_FAILED but 42 was expected

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions