Skip to content

Commit

Permalink
Added more logging to PcgenFtlTestCase.java (it will help to determin…
Browse files Browse the repository at this point in the history
…e the difference between "golden" and generated files).

Trimmed lines in base.xml and base-xml.ftl template.
  • Loading branch information
Vest committed Jan 11, 2025
1 parent f6466bf commit 01b97b5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion code/src/test/pcgen/inttest/PcgenFtlTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ public static void runTest(String character, String mode) throws IOException
.withTest(Input.fromString(actual))
.build();

assertFalse(myDiff.hasDifferences(), myDiff.toString());
assertFalse(myDiff.hasDifferences(), myDiff.fullDescription());
}
}
24 changes: 12 additions & 12 deletions code/testsuite/base-xml.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#ftl encoding="UTF-8" strip_whitespace=true >
<?xml version="1.0" encoding="UTF-8"?>
<#--
<#--
# Freemarker template for the character integration tests.
# Copyright James Dempsey, 2013
#
Expand Down Expand Up @@ -57,7 +57,7 @@
<sequence>${class}</sequence>
</class>
</#list>
</#if>
</#if>
<levels_total><@pcstring tag="TOTALLEVELS"/></levels_total>
<levels_ecl><@pcstring tag="ECL"/></levels_ecl>
<!-- shortform below should be removed - it can be derived from class info above -->
Expand Down Expand Up @@ -187,7 +187,7 @@
====================================
====================================-->
<abilities>
<@loop from=0 to=pcvar('COUNT[STATS]-1') ; stat , stat_has_next >
<@loop from=0 to=pcvar('COUNT[STATS]-1') ; stat , stat_has_next >
<ability>
<name>
<long><@pcstring tag="STAT.${stat}.LONGNAME"/></long>
Expand All @@ -202,7 +202,7 @@
<no_temp_score><@pcstring tag="STAT.${stat}.NOTEMP"/></no_temp_score>
<no_temp_modifier><@pcstring tag="STAT.${stat}.MOD.NOTEMP"/></no_temp_modifier>
</ability>
</@loop>
</@loop>
</abilities>
<!--
====================================
Expand All @@ -226,7 +226,7 @@
<stat><@pcstring tag="HPROLL.${level}.STAT"/></stat>
<total><@pcstring tag="HPROLL.${level}.TOTAL"/></total>
</roll>
</@loop>
</@loop>
</history>
</hit_points>
<!--
Expand Down Expand Up @@ -470,7 +470,7 @@
</w2_o>
</melee>
</#macro>
<#t>
<#t>
<weapons>
<unarmed>
<total><@pcstring tag="WEAPONH.TOTALHIT"/></total>
Expand All @@ -483,7 +483,7 @@
<#assign weaponCategory>
<@pcstring tag="WEAPON.${weap}.CATEGORY" /><#t>
</#assign>
<#-- For weapons of category 'both' we expect to see two consective
<#-- For weapons of category 'both' we expect to see two consective
- weapons, one defining the melee use and one the ranged use. -->
<#if weaponCategory?lower_case?contains('both')>
<#if !weaponCategory?lower_case?contains('ranged')>
Expand Down Expand Up @@ -852,7 +852,7 @@
<hidden>F</hidden>
<virtual>F</virtual>
</feat>
</@loop>
</@loop>

<!-- Auto feats -->
<@loop from=0 to=pcvar('countdistinct("ABILITIES","CATEGORY=FEAT","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=AUTOMATIC")-1') ; feat , feat_has_next >
Expand All @@ -866,7 +866,7 @@
<hidden>F</hidden>
<virtual>F</virtual>
</feat>
</@loop>
</@loop>

<!-- Virtual Feats -->
<@loop from=0 to=pcvar('COUNT[VFEATS.VISIBLE]-1') ; feat , feat_has_next >
Expand All @@ -880,7 +880,7 @@
<hidden>F</hidden>
<virtual>T</virtual>
</feat>
</@loop>
</@loop>
<!-- End Virtual Feats -->
<!-- Hidden feats (all feats less the virtual, automatic and visible ones) -->
<@loop from=0 to=pcvar('COUNT[FEATS.HIDDEN]-1') ; feat , feat_has_next >
Expand Down Expand Up @@ -1241,7 +1241,7 @@
<memorized_spells/>
<#else>
<memorized_spells>
<!-- ### BEGIN innate memorized spell section -->
<!-- ### BEGIN innate memorized spell section -->
<#if (pcvar('COUNT[SPELLRACE]') > 0) >
<!-- ### BEGIN innate memorized spells ### -->
<#assign spellbook = 1 />
Expand Down Expand Up @@ -1278,7 +1278,7 @@
<!-- ### END class innate memorized spells ### -->
</#if>
<!-- ### END innate memorized spell section -->

<!-- ### BEGIN class Spellbook memorized spells ### -->
<@loop from=2 to=pcvar('COUNT[SPELLBOOKS]-1') ; spellbook >
<#assign foo = pcvar('COUNT[SPELLRACE]') />
Expand Down
28 changes: 14 additions & 14 deletions code/testsuite/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
<hitdice>|HITDICE|</hitdice>
<interests>|INTERESTS|</interests>
<languages>
|FOR,%lang,0,COUNT[LANGUAGES]-1,1,0|
|FOR,%lang,0,COUNT[LANGUAGES]-1,1,0|
<language>|LANGUAGES.%lang|</language>
|ENDFOR|
|ENDFOR|
<all>|LANGUAGES|</all>
</languages>
<location>|LOCATION|</location>
Expand Down Expand Up @@ -162,7 +162,7 @@
====================================
====================================-->
<abilities>
|FOR,%stat,0,COUNT[STATS]-1,1,0|
|FOR,%stat,0,COUNT[STATS]-1,1,0|
<ability>
<name>
<long>|STAT.%stat.LONGNAME|</long>
Expand All @@ -177,7 +177,7 @@
<no_temp_score>|STAT.%stat.NOTEMP|</no_temp_score>
<no_temp_modifier>|STAT.%stat.MOD.NOTEMP|</no_temp_modifier>
</ability>
|ENDFOR|
|ENDFOR|
</abilities>
<!--
====================================
Expand All @@ -201,7 +201,7 @@
<stat>|HPROLL.%level.STAT|</stat>
<total>|HPROLL.%level.TOTAL|</total>
</roll>
|ENDFOR|
|ENDFOR|
</history>
</hit_points>
<!--
Expand Down Expand Up @@ -385,7 +385,7 @@
<!-- Should be changed to a variable due to improved crit -->
</unarmed>


|FOR,%weap,0,COUNT[EQTYPE.WEAPON]-1,1,1|

|IIF(WEAPON.%weap.CATEGORY:BOTH)|
Expand Down Expand Up @@ -1008,7 +1008,7 @@
====================================-->
<feats>
<!-- Visible standard feats (not including the auto feats) -->
|FOR,%feat,0,countdistinct("ABILITIES","CATEGORY=FEAT","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=NORMAL")-1,1,0|
|FOR,%feat,0,countdistinct("ABILITIES","CATEGORY=FEAT","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=NORMAL")-1,1,0|
<feat>
<name>|ABILITY.FEAT.VISIBLE.%feat|</name>
<description>|ABILITY.FEAT.VISIBLE.%feat.DESC|</description>
Expand All @@ -1019,10 +1019,10 @@
<hidden>F</hidden>
<virtual>F</virtual>
</feat>
|ENDFOR|
|ENDFOR|

<!-- Auto feats -->
|FOR,%feat,0,countdistinct("ABILITIES","CATEGORY=FEAT","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=AUTOMATIC")-1,1,0|
|FOR,%feat,0,countdistinct("ABILITIES","CATEGORY=FEAT","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=AUTOMATIC")-1,1,0|
<feat>
<name>|ABILITYAUTO.FEAT.VISIBLE.%feat|</name>
<description>|ABILITYAUTO.FEAT.VISIBLE.%feat.DESC|</description>
Expand All @@ -1033,10 +1033,10 @@
<hidden>F</hidden>
<virtual>F</virtual>
</feat>
|ENDFOR|
|ENDFOR|

<!-- Virtual Feats -->
|FOR,%feat,0,COUNT[VFEATS.VISIBLE]-1,1,0|
|FOR,%feat,0,COUNT[VFEATS.VISIBLE]-1,1,0|
<feat>
<name>|VFEAT.VISIBLE.%feat|</name>
<description>|VFEAT.VISIBLE.%feat.DESC|</description>
Expand All @@ -1047,7 +1047,7 @@
<hidden>F</hidden>
<virtual>T</virtual>
</feat>
|ENDFOR|
|ENDFOR|
<!-- End Virtual Feats -->
<!-- Hidden feats (all feats less the virtual, automatic and visible ones) -->
|FOR,%feat,0,COUNT[FEATS.HIDDEN]-1,1,0|
Expand Down Expand Up @@ -1511,7 +1511,7 @@
====================================
====================================-->
<companions>
|%FOLLOWERTYPE.FAMILIAR|
|%FOLLOWERTYPE.FAMILIAR|
<familiar>
<!-- Note that only one familiar is allowed, so no support for multiple familiars -->
<name>|FOLLOWERTYPE.FAMILIAR.0.NAME|</name>
Expand Down Expand Up @@ -1881,7 +1881,7 @@
<memorized_spells/>
|ELSE|
<memorized_spells>
<!-- ### BEGIN innate memorized spell section -->
<!-- ### BEGIN innate memorized spell section -->
|FOR,%spellrace,COUNT[SPELLRACE],COUNT[SPELLRACE],1,0|
|IIF(%spellrace:0)|
|ELSE|
Expand Down
6 changes: 3 additions & 3 deletions code/testsuite/csheets/pf_Paladin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,7 @@ BIO
</ability_object>
<ability_object>
<name>Channel Positive Energy</name>
<description>You can unleash a wave of positive energy dealing 3d6 (DC 15 for half) /day. You can unleash a wave of positive energy. You must choose to deal 3d6 points of positive energy damage to undead creatures or to heal living creatures of 3d6 points of damage. Creatures that take damage from channeled energy receive a DC 15 Will save to halve the damage. Using this ability consumes two uses of her lay on hands ability.</description>
<description>You can unleash a wave of positive energy dealing 3d6 (DC 15 for half) 2/day. You can unleash a wave of positive energy. You must choose to deal 3d6 points of positive energy damage to undead creatures or to heal living creatures of 3d6 points of damage. Creatures that take damage from channeled energy receive a DC 15 Will save to halve the damage. Using this ability consumes two uses of her lay on hands ability.</description>
<type>PALADINCLASSFEATURES.SPECIALATTACK.SUPERNATURAL.CHANNEL ENERGY.CHANNEL ENERGY POSITIVE.CHANNEL POSITIVE ENERGY</type>
<associated></associated>
<count>0</count>
Expand Down Expand Up @@ -4878,7 +4878,7 @@ BIO
<!-- ### END Known spells ### -->
<!-- ### BEGIN memorized spells ### -->
<memorized_spells>
<!-- ### BEGIN innate memorized spell section -->
<!-- ### BEGIN innate memorized spell section -->
<!-- ### BEGIN innate memorized spells ### -->
<!-- ### END innate memorized spells ### -->
<!-- ### BEGIN class innate memorized spells ### -->
Expand Down Expand Up @@ -4917,7 +4917,7 @@ BIO
</class_innate_memorized>
<!-- ### END class innate memorized spells ### -->
<!-- ### END innate memorized spell section -->

<!-- ### BEGIN class Spellbook memorized spells ### -->
<!-- Either we do not have a innate race, or if we do we do not have any 0 level spell for the innate race -->
<spellbook number="2" name="Class">
Expand Down

0 comments on commit 01b97b5

Please sign in to comment.