Skip to content

Commit

Permalink
feat(#3042): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Apr 10, 2024
1 parent 7e791c0 commit 5d3b790
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ SOFTWARE.
</xsl:with-param>
<xsl:with-param name="rho" select="'this'"/>
</xsl:apply-templates>
<xsl:if test="o[@const]">
<xsl:value-of select="eo:tabs(3)"/>
<xsl:text>ret = new PhConst(ret);</xsl:text>
<xsl:value-of select="eo:eol(0)"/>
</xsl:if>
<xsl:value-of select="eo:tabs(3)"/>
<xsl:text>return ret;</xsl:text>
<xsl:value-of select="eo:eol(2)"/>
Expand All @@ -268,11 +263,6 @@ SOFTWARE.
</xsl:with-param>
<xsl:with-param name="rho" select="'rho'"/>
</xsl:apply-templates>
<xsl:if test="o[@const]">
<xsl:value-of select="eo:tabs(3)"/>
<xsl:text>ret = new PhConst(ret);</xsl:text>
<xsl:value-of select="eo:eol(0)"/>
</xsl:if>
<xsl:value-of select="eo:tabs(3)"/>
<xsl:text>return ret;</xsl:text>
<xsl:value-of select="eo:eol(2)"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
666
two.f1.f2 x
stdout > z
sprintf > f!
sprintf > f
"Hello, ".trim
x 0x1fff n

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eo="https://www.eolang.org" id="const-to-dataized" version="2.0">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eo="https://www.eolang.org" id="const-to-dataized" version="2.0">
<!--
Here we go through all objects and find what their @base
are referring to. If we find the object they refer to,
Expand Down Expand Up @@ -52,6 +52,8 @@ SOFTWARE.
<xsl:element name="o">
<xsl:attribute name="base" select="'.as-bytes'"/>
<xsl:attribute name="name" select="@name"/>
<xsl:attribute name="line" select="@line"/>
<xsl:attribute name="pos" select="@pos + 8"/>
<xsl:element name="o">
<xsl:attribute name="base" select="'org.eolang.dataized'"/>
<xsl:element name="o">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
tests:
- //o[@base='.as-bytes' and @name='x' and o[@base='org.eolang.dataized' and o[@base='org.eolang.int' and not(@name)]]]
- //o[@base='.as-bytes' and @name='m' and o[@base='org.eolang.dataized' and o[@abstract and @name='m-3' and count(o)=2]]]
- //o[@base='.as-bytes' and @name='z' and o[@base='org.eolang.dataized' and o[@base='.o' and not(@name) and count(o)=1]]]
- //o[@base='.as-bytes' and @name='y' and o[@base='org.eolang.dataized' and o[@base='org.eolang.c' and not(@name)]]]
- //o[@base='.as-bytes' and @line and @pos and @name='x' and o[@base='org.eolang.dataized' and o[@base='org.eolang.int' and not(@name)]]]
- //o[@base='.as-bytes' and @line and @pos and @name='m' and o[@base='org.eolang.dataized' and o[@abstract and @name='m-3' and count(o)=2]]]
- //o[@base='.as-bytes' and @line and @pos and @name='z' and o[@base='org.eolang.dataized' and o[@base='.o' and not(@name) and count(o)=1]]]
- //o[@base='.as-bytes' and @line and @pos and @name='y' and o[@base='org.eolang.dataized' and o[@base='org.eolang.c' and not(@name)]]]
- //objects[count(//o[@const])=0]
eo: |
# This is the default 64+ symbols comment in front of abstract object.
[] > foo
Expand Down

0 comments on commit 5d3b790

Please sign in to comment.