@@ -166,82 +166,24 @@ final class OpmlXmlFactoryTest extends munit.FunSuite {
166
166
test (" head tag inside outline tag fails" ) {
167
167
/* `compileErrors` being in the error message here is weird, but as long as its some munit oddity and not appearing in real uses, its whatever */
168
168
assertNoDiff(
169
- compileErrors(""" xml"<outline text='section'><head /></outline>"""" ),
169
+ compileErrors(""" xml"<outline text='section'><head /></outline>"""" )
170
+ .linesWithSeparators.take(16 ).mkString,
170
171
""" |error:
171
172
|Found: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
172
173
|Required: (
173
174
| name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
174
175
| OutlineAttribute
175
176
| | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag)*
176
- | compileErrors(""" .stripMargin + " \"\"\" " + """ xml"<outline text='section'><head /></outline>""" .stripMargin + " \"\"\"\" " + """ ),
177
+ | compileErrors(""" .stripMargin + " \"\"\" " + """ xml"<outline text='section'><head /></outline>""" .stripMargin + " \"\"\"\" " + """ )
177
178
| ^
178
179
|error:
179
180
|Found: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
180
181
|Required: (
181
182
| name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
182
183
| OutlineAttribute
183
184
| | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag)*
184
- | compileErrors(""" .stripMargin + " \"\"\" " + """ xml"<outline text='section'><head /></outline>""" .stripMargin + " \"\"\"\" " + """ ),
185
+ | compileErrors(""" .stripMargin + " \"\"\" " + """ xml"<outline text='section'><head /></outline>""" .stripMargin + " \"\"\"\" " + """ )
185
186
| ^
186
- |error:
187
- |Malformed tree was found while expanding macro with -Xcheck-macros.
188
- | |The tree does not conform to the compiler's tree invariants.
189
- | |
190
- | |Macro was:
191
- | |scala.quoted.runtime.Expr.splice[scala.Any](((evidence$1: scala.quoted.Quotes) ?=> name.rayrobdod.stringContextParserCombinatorExample.xml.package$package.inline$XmlParser.interpolate[scala.Any](scala.quoted.runtime.Expr.quote[scala.StringContext](_root_.scala.StringContext.apply("<outline text=\'section\'><head /></outline>")).apply(using evidence$1), scala.quoted.runtime.Expr.quote[scala.collection.immutable.Seq[scala.Any]]().apply(using evidence$1), scala.quoted.runtime.Expr.quote[name.rayrobdod.stringContextParserCombinatorExample.xml.XmlFactory[scala.Any]](OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type).apply(using evidence$1))(scala.quoted.Type.of[scala.Any](evidence$1), evidence$1)))
192
- | |
193
- | |The macro returned:
194
- | |OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type.literal(OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type.elements.outline(OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type.attributes.text(OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type.values.selectDynamic("section")), OpmlXmlFactoryTest.this.given_OpmlXmlFactory_type.elements.head()))
195
- | |
196
- | |Error:
197
- | |assertion failed: Type Mismatch (while checking adapt):
198
- |Found: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
199
- |Required: (
200
- | name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
201
- | OutlineAttribute
202
- | | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag)*
203
- |
204
- |The following import might make progress towards fixing the problem:
205
- |
206
- | import munit.Clue.generate
207
- |
208
- |
209
- |I tried to show that
210
- | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
211
- |conforms to
212
- | (
213
- | name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
214
- | OutlineAttribute
215
- | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag)*
216
- |but none of the attempts shown below succeeded:
217
- |
218
- | ==> name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag* <: (
219
- | name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
220
- | OutlineAttribute
221
- | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag)*
222
- | ==> name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag <: name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
223
- | OutlineAttribute |
224
- | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag
225
- | ==> name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag <: name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
226
- | OutlineAttribute = false
227
- | ==> name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag <: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.OutlineTag = false
228
- |
229
- |The tests were made under a constraint with:
230
- | uninstantiated variables: (param)27
231
- | constrained types: [(param)27 <: Any & Singleton]: arg.type
232
- | bounds:
233
- | (param)27 <: Any & Singleton
234
- | ordering:
235
- | co-deps:
236
- | contra-deps:
237
- |
238
- |tree = [this.given_OpmlXmlFactory_type.elements.head([ : Nothing]*) :
239
- | name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag]* Typed
240
- | |
241
- |stacktrace available when compiling with `-Ydebug`
242
- | |
243
- | ${XmlParser.interpolate('sc, 'args, 'factory)}
244
- | ^
245
187
|""" .stripMargin
246
188
)
247
189
}
0 commit comments