Skip to content

Commit 9bd8432

Browse files
committed
[xml] Truncate a compileErrors test since the second part has different wrapping on different systems
1 parent 2b90025 commit 9bd8432

File tree

1 file changed

+4
-62
lines changed

1 file changed

+4
-62
lines changed

XmlParser/src/test/scala/OpmlXmlFactoryTest.scala

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -166,82 +166,24 @@ final class OpmlXmlFactoryTest extends munit.FunSuite {
166166
test ("head tag inside outline tag fails") {
167167
/* `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 */
168168
assertNoDiff(
169-
compileErrors("""xml"<outline text='section'><head /></outline>""""),
169+
compileErrors("""xml"<outline text='section'><head /></outline>"""")
170+
.linesWithSeparators.take(16).mkString,
170171
"""|error:
171172
|Found: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
172173
|Required: (
173174
| name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
174175
| OutlineAttribute
175176
| | 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 + "\"\"\"\"" + """)
177178
| ^
178179
|error:
179180
|Found: name.rayrobdod.stringContextParserCombinatorExample.xml.Opml.HeadTag*
180181
|Required: (
181182
| name.rayrobdod.stringContextParserCombinatorExample.xml.OpmlXmlFactory.
182183
| OutlineAttribute
183184
| | 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 + "\"\"\"\"" + """)
185186
| ^
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-
| ^
245187
|""".stripMargin
246188
)
247189
}

0 commit comments

Comments
 (0)