Skip to content

Commit 9845e98

Browse files
committed
Test convert error for float types
1 parent 0e4668c commit 9845e98

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/embed_tests/TestConverter.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Linq;
4+
35
using NUnit.Framework;
46

57
using Python.Runtime;
@@ -63,9 +65,14 @@ public void TestConvertDoubleToManaged(
6365
[Test]
6466
public void CovertTypeError()
6567
{
68+
Type[] floatTypes = new Type[]
69+
{
70+
typeof(float),
71+
typeof(double)
72+
};
6673
using (var s = new PyString("abc"))
6774
{
68-
foreach (var type in _numTypes)
75+
foreach (var type in _numTypes.Union(floatTypes))
6976
{
7077
object value;
7178
try

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy