| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -314,4 +314,16 @@ public static Spam[][] EchoRangeAA(Spam[][] items) | |||
| 314 | 314 | return items; | |
| 315 | 315 | } | |
| 316 | 316 | } | |
| 317 | + | ||
| 318 | + public struct Point | ||
| 319 | + { | ||
| 320 | + public Point(float x, float y) | ||
| 321 | + { | ||
| 322 | + X = x; | ||
| 323 | + Y = y; | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + public float X { get; set; } | ||
| 327 | + public float Y { get; set; } | ||
| 328 | + } | ||
| 317 | 329 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1166,10 +1166,8 @@ def test_boxed_value_type_mutation_result(): | |||
| 1166 | 1166 | # to accidentally write code like the following which is not really | |
| 1167 | 1167 | # mutating value types in-place but changing boxed copies. | |
| 1168 | 1168 | ||
| 1169 | - clr.AddReference('System.Drawing') | ||
| 1170 | - | ||
| 1171 | - from System.Drawing import Point | ||
| 1172 | 1169 | from System import Array | |
| 1170 | + from Python.Test import Point | ||
| 1173 | 1171 | ||
| 1174 | 1172 | items = Array.CreateInstance(Point, 5) | |
| 1175 | 1173 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -126,9 +126,7 @@ def __init__(self, v): | |||
| 126 | 126 | def test_struct_construction(): | |
| 127 | 127 | """Test construction of structs.""" | |
| 128 | 128 | ||
| 129 | - clr.AddReference('System.Drawing') | ||
| 130 | - | ||
| 131 | - from System.Drawing import Point | ||
| 129 | + from Python.Test import Point | ||
| 132 | 130 | ||
| 133 | 131 | p = Point() | |
| 134 | 132 | assert p.X == 0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments