Skip to content

Commit b750cad

Browse files
authored
Enable all implementation-defined-behavior examples (dotnet#725)
* activate example extraction * activate example extraction
1 parent d18331b commit b750cad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

standard/classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,8 @@ The static field variable initializers of a class correspond to a sequence of as
17831783
17841784
> *Example*: The example
17851785
>
1786-
> <!-- Maintenance Note: The behavior of this example is implementation-defined. As such, the metadata does *not* compare test output with any ```console block. When last tested, the output was the second of the two possibilities. -->
1787-
> <!-- ImplementationDefined$Example: {template:"standalone-console", name:"StaticFieldInitialization1"} -->
1786+
> <!-- Example: {template:"standalone-console", name:"StaticFieldInitialization1", ignoreOutput:true} -->
1787+
> <!-- Maintenance Note: The behavior of this example is implementation-defined. As such, the metadata does not compare test output with any ```console block. -->
17881788
> ```csharp
17891789
> class Test
17901790
> {

standard/unsafe-code.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ When a pointer type is converted to a pointer to `byte`, the result points to th
305305
306306
> *Example*: The following method displays each of the eight bytes in a `double` as a hexadecimal value:
307307
>
308-
> <!-- ImplementationDefined$Example: {template:"standalone-console", name:"PointerConversions2", expectedOutput:["BA","FF","51","A2","90","6C","24","45"], expectedErrors:["x","x"]} -->
308+
> <!-- Example: {template:"standalone-console", name:"PointerConversions2", ignoreOutput:true} -->
309309
> ```csharp
310310
> class Test
311311
> {
@@ -317,15 +317,15 @@ When a pointer type is converted to a pointer to `byte`, the result points to th
317317
> byte* pb = (byte*)&d;
318318
> for (int i = 0; i < sizeof(double); ++i)
319319
> {
320-
> Console.Write($"{*pb++:X2} ");
320+
> Console.Write($" {*pb++:X2}");
321321
> }
322322
> Console.WriteLine();
323323
> }
324324
> }
325325
> }
326326
> ```
327327
>
328-
> Of course, the output produced depends on endianness.
328+
> Of course, the output produced depends on endianness. One possibility is `" BA FF 51 A2 90 6C 24 45"`.
329329
>
330330
> *end example*
331331

0 commit comments

Comments
 (0)