Skip to content

Commit 8eead34

Browse files
committed
Comment out java 8 date tests
1 parent 4fd6c13 commit 8eead34

File tree

3 files changed

+6
-39
lines changed

3 files changed

+6
-39
lines changed

grails-plugin-databinding/src/main/groovy/org/grails/plugins/databinding/DataBindingGrailsPlugin.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
*/
1616
package org.grails.plugins.databinding
1717

18-
import grails.internal.JavaVersion
1918
import grails.plugins.Plugin
2019
import grails.util.GrailsUtil
2120
import grails.web.databinding.DataBindingUtils
2221
import grails.web.databinding.GrailsWebDataBinder
23-
import org.grails.databinding.converters.web.Jsr310ConvertersConfiguration
2422
import org.grails.web.databinding.bindingsource.DataBindingSourceRegistry
2523
import org.grails.web.databinding.bindingsource.DefaultDataBindingSourceRegistry
2624
import org.grails.web.databinding.bindingsource.HalJsonDataBindingSourceCreator

grails-test-suite-web/src/test/groovy/org/grails/web/taglib/FormTagLib2Tests.groovy

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
package org.grails.web.taglib
22

3-
import org.junit.Ignore
43

54
import java.text.DateFormat
65
import org.w3c.dom.Document
76

8-
import java.time.*
9-
import java.time.temporal.TemporalAccessor
10-
117
/**
128
* Tests for the FormTagLib.groovy file which contains tags to help with the
139
* creation of HTML forms
@@ -52,18 +48,15 @@ class FormTagLib2Tests extends AbstractGrailsTagTests {
5248
void testDatePickerTagWithCustomDate() {
5349
testDatePickerTag(new Date(0), null)
5450
}
55-
56-
@Ignore
51+
/*
5752
void testDatePickerTagWithLocalDateTime() {
5853
testDatePickerTag(LocalDateTime.now(), null)
5954
}
6055
61-
@Ignore
6256
void testDatePickerTagWithLocalDate() {
6357
testDatePickerTag(LocalDate.now(), null)
6458
}
6559
66-
@Ignore
6760
void testDatePickerTagWithLocalTime() {
6861
try {
6962
testDatePickerTag(LocalTime.now(), null)
@@ -72,12 +65,10 @@ class FormTagLib2Tests extends AbstractGrailsTagTests {
7265
}
7366
}
7467
75-
@Ignore
7668
void testDatePickerTagWithOffsetDateTime() {
7769
testDatePickerTag(OffsetDateTime.now(), null)
7870
}
7971
80-
@Ignore
8172
void testDatePickerTagWithOffsetTime() {
8273
try {
8374
testDatePickerTag(OffsetTime.now(), null)
@@ -87,12 +78,10 @@ class FormTagLib2Tests extends AbstractGrailsTagTests {
8778
8879
}
8980
90-
@Ignore
9181
void testDatePickerTagWithZonedDateTime() {
9282
testDatePickerTag(ZonedDateTime.now(), null)
93-
}
83+
}*/
9484

95-
@Ignore
9685
void testDatePickerTagWithDefault() {
9786
def defaultDate = Calendar.getInstance()
9887
defaultDate.add(Calendar.DAY_OF_MONTH, 7)
@@ -161,7 +150,7 @@ class FormTagLib2Tests extends AbstractGrailsTagTests {
161150
if (date != null) {
162151
if (date instanceof Date) {
163152
calendar.setTime(date)
164-
} else if (date instanceof TemporalAccessor) {
153+
} /*else if (date instanceof TemporalAccessor) {
165154
ZonedDateTime zonedDateTime
166155
if (date instanceof LocalDateTime) {
167156
zonedDateTime = ZonedDateTime.of(date, ZoneId.systemDefault())
@@ -171,7 +160,7 @@ class FormTagLib2Tests extends AbstractGrailsTagTests {
171160
zonedDateTime = ZonedDateTime.from(date)
172161
}
173162
calendar = GregorianCalendar.from(zonedDateTime)
174-
}
163+
}*/
175164
}
176165

177166
// validate id attributes

grails-test-suite-web/src/test/groovy/org/grails/web/taglib/FormatTagLibTests.groovy

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
package org.grails.web.taglib
22

33
import org.grails.buffer.StreamCharBuffer
4-
import org.junit.Ignore
54
import spock.lang.Issue
6-
75
import java.text.DecimalFormatSymbols
8-
96
import org.grails.taglib.GrailsTagException
107

11-
import java.time.*
12-
138
/**
149
* Tests for the FormatTagLib.
1510
*
@@ -59,117 +54,102 @@ class FormatTagLibTests extends AbstractGrailsTagTests {
5954
assertOutputEquals("1980-02-03", template, [date:calender.getTime()])
6055
}
6156

62-
@Ignore
57+
/*
6358
void testFormatLocalDate() {
6459
def date = LocalDate.of(1980, 2, 3)
6560
def template = '<g:formatDate format="yyyy-MM-dd" date="${date}"/>'
6661
assertOutputEquals("1980-02-03", template, [date: date])
6762
}
6863
69-
@Ignore
7064
void testFormatLocalTime() {
7165
def date = LocalTime.of(22, 2, 3)
7266
def template = '<g:formatDate format="HH:mm:ss" date="${date}"/>'
7367
assertOutputEquals("22:02:03", template, [date: date])
7468
}
7569
76-
@Ignore
7770
void testFormatLocalDateTime() {
7871
def date = LocalDateTime.of(1980, 2, 3, 22, 2, 3)
7972
def template = '<g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${date}"/>'
8073
assertOutputEquals("1980-02-03 22:02:03", template, [date: date])
8174
}
8275
83-
@Ignore
8476
void testFormatOffsetTime() {
8577
def date = OffsetTime.of(22, 2, 3, 0, ZoneOffset.MIN)
8678
def template = '<g:formatDate format="HH:mm:ss:SS" date="${date}"/>'
8779
assertOutputEquals("22:02:03:00", template, [date: date])
8880
}
8981
90-
@Ignore
9182
void testFormatOffsetDateTime() {
9283
def date = OffsetDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
9384
def template = '<g:formatDate format="yyyy-MM-dd HH:mm:ss:SS" date="${date}"/>'
9485
assertOutputEquals("1980-02-04 11:02:03:00", template, [date: date])
9586
}
9687
97-
@Ignore
9888
void testFormatZonedDateTime() {
9989
def date = ZonedDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
10090
def template = '<g:formatDate format="yyyy-MM-dd HH:mm:ss:SS" date="${date}"/>'
10191
assertOutputEquals("1980-02-04 11:02:03:00", template, [date: date])
10292
}
10393
104-
@Ignore
10594
void testFormatDateWithStyle() {
10695
def calender = new GregorianCalendar(1980,1,3)
10796
def template = '<g:formatDate date="${date}" type="date" style="LONG" locale="en_US"/>'
10897
assertOutputEquals("February 3, 1980", template, [date:calender.getTime()])
10998
}
11099
111-
@Ignore
112100
void testFormatLocalDateWithStyle() {
113101
def date = LocalDate.of(1980, 2, 3)
114102
def template = '<g:formatDate date="${date}" type="date" style="LONG" locale="en_US"/>'
115103
assertOutputEquals("February 3, 1980", template, [date: date])
116104
}
117105
118-
@Ignore
119106
void testFormatLocalDateTimeWithStyle() {
120107
def date = LocalDateTime.of(1980, 2, 3, 22, 2, 3)
121108
def template = '<g:formatDate date="${date}" type="date" style="LONG" locale="en_US"/>'
122109
assertOutputEquals("February 3, 1980", template, [date: date])
123110
}
124111
125-
@Ignore
126112
void testFormatOffsetDateTimeWithStyle() {
127113
def date = OffsetDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
128114
def template = '<g:formatDate date="${date}" type="date" style="LONG" locale="en_US"/>'
129115
assertOutputEquals("February 4, 1980", template, [date: date])
130116
}
131117
132-
@Ignore
133118
void testFormatZonedDateTimeWithStyle() {
134119
def date = ZonedDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
135120
def template = '<g:formatDate date="${date}" type="date" style="LONG" locale="en_US"/>'
136121
assertOutputEquals("February 4, 1980", template, [date: date])
137122
}
138123
139-
@Ignore
140124
void testFormatDateTimeWithStyle() {
141125
def calender = new GregorianCalendar(1980,1,3)
142126
def template = '<g:formatDate date="${date}" type="datetime" style="LONG" timeStyle="SHORT" locale="en_US"/>'
143127
assertOutputEquals("February 3, 1980 12:00 AM", template, [date:calender.getTime()])
144128
}
145129
146-
@Ignore
147130
void testFormatLocalDateWithTimeStyle() {
148131
def date = LocalDate.of(1980, 2, 3)
149132
def template = '<g:formatDate date="${date}" type="datetime" style="LONG" timeStyle="SHORT" locale="en_US"/>'
150133
assertOutputEquals("February 3, 1980 12:00 AM", template, [date: date])
151134
}
152135
153-
@Ignore
154136
void testFormatLocalDateTimeWithTimeStyle() {
155137
def date = LocalDateTime.of(1980, 2, 3, 22, 2, 3)
156138
def template = '<g:formatDate date="${date}" type="datetime" style="LONG" timeStyle="SHORT" locale="en_US"/>'
157139
assertOutputEquals("February 3, 1980 10:02 PM", template, [date: date])
158140
}
159141
160-
@Ignore
161142
void testFormatOffsetDateTimeWithTimeStyle() {
162143
def date = OffsetDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
163144
def template = '<g:formatDate date="${date}" type="datetime" style="LONG" timeStyle="SHORT" locale="en_US"/>'
164145
assertOutputEquals("February 4, 1980 11:02 AM", template, [date: date])
165146
}
166147
167-
@Ignore
168148
void testFormatZonedDateTimeWithTimeStyle() {
169149
def date = ZonedDateTime.of(1980, 2, 3, 22, 2, 3, 0, ZoneOffset.MIN)
170150
def template = '<g:formatDate date="${date}" type="datetime" style="LONG" timeStyle="SHORT" locale="en_US"/>'
171151
assertOutputEquals("February 4, 1980 11:02 AM", template, [date: date])
172-
}
152+
}*/
173153

174154
void testFormatDateNullDate() {
175155
def template = '<g:formatDate format="yyyy-MM-dd" date="${date}"/>'

0 commit comments

Comments
 (0)