From 20a9a202e9e79bb72807ccda0d0526e2200fcf72 Mon Sep 17 00:00:00 2001 From: jdramaix Date: Fri, 29 Nov 2013 12:48:13 +0100 Subject: [PATCH] add test for issue #216 --- .../google/gwt/query/client/GQueryCoreTestGwt.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java index c86b67e4..50f99d6f 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java @@ -2049,4 +2049,18 @@ public class GQueryCoreTestGwt extends GWTTestCase { assertEquals(ulParentsNumber + 2, result.size()); } + // issue #216 : https://github.com/gwtquery/gwtquery/issues/216 + public void testDataAsInteger() { + $(e).html("
"); + + GQuery target = $("#target", e); + + $("#target", e).data("intValue", new Integer(1)); + + Integer value = $("#target", e).data("intValue", Integer.class); + + assertEquals(1, value.intValue()); + + } + } -- 2.39.5