Skip to content

Commit

Permalink
fix(objectionary#3529): finally
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Dec 3, 2024
1 parent ef84d92 commit 854195d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SOFTWARE.
<xsl:apply-templates select="/program/objects//o" mode="sodg"/>
</xsl:copy>
</xsl:template>
<xsl:template match="o[not(starts-with(@base, '.')) and not(@level) and o or eo:abstract(.) or (not(@base) and @name)]" mode="sodg" priority="1">
<xsl:template match="o[not(starts-with(@base, '.')) and not(@level) and o or eo:abstract(.)]" mode="sodg" priority="1">
<xsl:variable name="o" select="."/>
<xsl:if test="not(@loc)">
<xsl:message terminate="yes">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@
* Test case for {@link SodgMojo}.
*
* @since 0.1
* @todo #3229:30min Enable the Sodg packs. The next Sodg packs were disabled when we got rid of
* @todo #3529:30min Enable the Sodg packs. The next Sodg packs were disabled when we got rid of
* "abstract" attribute in XMIR: copy-of-abstract, copy-of-argument, dot-on-ref, nested-anonymous,
* rho, vars. We need to enable them and make sure they pass.
* @todo #3529:30min Enable the test {@link SodgMojoTest#transformsThroughSheets}. The test was
* disabled when we got rid of "abstract" attribute in XMIR. We need to enable the test and make
* sure it works correctly.
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
@ExtendWith(MktmpResolver.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ xsls:
- /org/eolang/parser/wrap-method-calls.xsl
- /org/eolang/parser/optimize/globals-to-abstracts.xsl
- /org/eolang/parser/optimize/remove-refs.xsl
# - /org/eolang/parser/optimize/abstracts-float-up.xsl
# - /org/eolang/parser/optimize/remove-levels.xsl
# - /org/eolang/parser/add-refs.xsl
# - /org/eolang/parser/optimize/fix-missed-names.xsl
# - /org/eolang/parser/add-refs.xsl
# - /org/eolang/maven/pre/classes.xsl
# - /org/eolang/maven/pre/attrs.xsl
# - /org/eolang/maven/pre/data.xsl
# - /org/eolang/maven/pre/to-java.xsl
# - /org/eolang/parser/blank-xsd-schema.xsl
- /org/eolang/parser/optimize/abstracts-float-up.xsl
- /org/eolang/parser/optimize/remove-levels.xsl
- /org/eolang/parser/add-refs.xsl
- /org/eolang/parser/optimize/fix-missed-names.xsl
- /org/eolang/parser/add-refs.xsl
- /org/eolang/maven/pre/classes.xsl
- /org/eolang/maven/pre/attrs.xsl
- /org/eolang/maven/pre/data.xsl
- /org/eolang/maven/pre/to-java.xsl
- /org/eolang/parser/blank-xsd-schema.xsl
tests:
- /program[not(errors)]
- //java[contains(text(), 'PhMethod(new PhMethod(rho, "ρ"), "ρ")')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
skip: true
sheets:
- /org/eolang/maven/sodg/bind-rho.xsl
- /org/eolang/maven/sodg/bind-sigma.xsl
Expand All @@ -28,9 +29,9 @@ document:
<objects loc="Φ">
<o base="z" loc="Φ.a"/>
<o base=".not" line="2" loc="Φ.x" name="x">
<o base="org.eolang.bool" data="bytes" loc="Φ.x.ρ">01</o>
<o base="org.eolang.bool" loc="Φ.x.ρ">01</o>
</o>
<o name="f" loc="Φ.f"/>
<o base='∅' name="f" loc="Φ.f"/>
</objects>
<sodg/>
</program>
Expand Down
2 changes: 1 addition & 1 deletion eo-parser/src/main/java/org/eolang/parser/CheckPack.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Collection<String> failures() throws IOException {
)
)
);
Logger.info(this, "Output XML:\n%s", out);
Logger.debug(this, "Output XML:\n%s", out);
final Collection<String> failures = new LinkedList<>();
for (final String xpath : (Iterable<String>) map.get("tests")) {
if (out.nodes(xpath).isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ private Objects objects() {

/**
* Enter either tau or empty binding.
* @return Objects
*/
private Objects enterObjectBinding() {
return this.objects().start();
Expand Down
1 change: 0 additions & 1 deletion eo-parser/src/main/resources/XMIR.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ SOFTWARE.
<xs:attribute name="as" type="attribute-name"/>
<xs:attribute name="atom" type="fqn"/>
<xs:attribute name="loc" type="locator"/>
<xs:attribute name="abstract" type="empty"/>
<xs:attribute name="method" type="empty"/>
<xs:attribute name="const" type="empty"/>
</xs:complexType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ SOFTWARE.
<xsl:variable name="index" select="position()"/>
<xsl:for-each select="eo:vars($ancestors[count($ancestors) - $index + 1], $ancestors[count($ancestors) - $index])">
<xsl:element name="o">
<xsl:if test="@base='∅'">
<xsl:attribute name="base" select="@base"/>
</xsl:if>
<xsl:attribute name="base" select="'∅'"/>
<xsl:attribute name="name">
<xsl:value-of select="@name"/>
</xsl:attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.xembly.Xembler;

/**
Expand Down

0 comments on commit 854195d

Please sign in to comment.