BCUnit-List.xsl 4.32 KB
Newer Older
1
<?xml version='1.0'?>
2 3
<xsl:stylesheet	version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

4
	<xsl:template match="BCUNIT_TEST_LIST_REPORT">
5 6
		<html>
			<head>
7
				<title> BCUnit - Suite and Test Case Organization in Test Registry </title>
8 9 10 11 12 13 14 15
			</head>

			<body bgcolor="#e0e0f0">
				<xsl:apply-templates/>
			</body>
		</html>
	</xsl:template>

16
	<xsl:template match="BCUNIT_HEADER">
17 18
		<div align="center">
			<h3>
19 20
				<b> BCUnit - A Unit testing framework for C </b> <br/>
				<a href="https://github.com/BelledonneCommunications/bcunit/"> https://github.com/BelledonneCommunications/bcunit/ </a>
21 22 23 24
			</h3>
		</div>
	</xsl:template>

25
	<xsl:template match="BCUNIT_LIST_TOTAL_SUMMARY">
26 27 28 29 30 31
		<p/>
		<table align="center" width="50%">
			<xsl:apply-templates/>
		</table>
	</xsl:template>

32
	<xsl:template match="BCUNIT_LIST_TOTAL_SUMMARY_RECORD">
33 34
		<tr>
			<td bgcolor="#f0f0e0" width="70%">
35
				<xsl:value-of select="BCUNIT_LIST_TOTAL_SUMMARY_RECORD_TEXT" />
36 37
			</td>
			<td bgcolor="#f0e0e0" align="center">
38
				<xsl:value-of select="BCUNIT_LIST_TOTAL_SUMMARY_RECORD_VALUE" />
39 40 41 42
			</td>
		</tr>
	</xsl:template>

43
	<xsl:template match="BCUNIT_ALL_TEST_LISTING">
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
		<p/>
		<div align="center">
			<h2> Listing of Registered Suites &amp; Tests </h2>
		</div>
		<table align="center" width="90%">
			<tr bgcolor="#00ccff">
				<td colspan="8"> </td>
			</tr>
			<tr>
				<td width="44%" colspan="2" bgcolor="#f0f0e0"> </td>
				<td width="14%" bgcolor="#f0f0e0" align="center"> <b> Initialize Function? </b> </td>
				<td width="14%" bgcolor="#f0f0e0" align="center"> <b> Cleanup Function? </b> </td>
				<td width="14%" bgcolor="#f0f0e0" align="center"> <b> Test Count </b> </td>
				<td width="14%" bgcolor="#f0f0e0" align="center"> <b> Active? </b> </td>
			</tr>
			<xsl:apply-templates/>
		</table>
	</xsl:template>

63
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_SUITE">
64 65 66
		<xsl:apply-templates/>
	</xsl:template>

67
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_SUITE_DEFINITION">
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
		<tr bgcolor="#00ccff">
			<td colspan="8"> </td>
		</tr>
		<tr>
			<td bgcolor="#f0e0f0" align="left"> Suite </td>
			<td bgcolor="#f0e0f0" align="left"> <b> <xsl:value-of select="SUITE_NAME" /> </b> </td>

			<td bgcolor="#f0e0f0" align="center"> <xsl:value-of select="INITIALIZE_VALUE" /> </td>
			<td bgcolor="#f0e0f0" align="center"> <xsl:value-of select="CLEANUP_VALUE" /> </td>
			<td bgcolor="#f0e0f0" align="center"> <xsl:value-of select="TEST_COUNT_VALUE" /> </td>
			<td bgcolor="#f0e0f0" align="center"> <xsl:value-of select="ACTIVE_VALUE" /> </td>
		</tr>
		<tr bgcolor="#00ccff">
			<td colspan="8"> </td>
		</tr>
	</xsl:template>

85
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_SUITE_TESTS">
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="TEST_CASE_DEFINITION">
		<tr>
			<td align="center" bgcolor="#e0f0d0"> Test </td>
			<td align="left" colspan="4" bgcolor="#e0e0d0">
				<xsl:value-of select="TEST_CASE_NAME" />
			</td>
			<td align="center" bgcolor="#e0e0d0">
				<xsl:value-of select="TEST_ACTIVE_VALUE" />
			</td>
		</tr>
	</xsl:template>

101
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_GROUP">
102 103 104
		<xsl:apply-templates/>
	</xsl:template>

105
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_GROUP_DEFINITION">
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
		<tr>
			<td width="10%" bgcolor="#f0e0f0"> Suite </td>
			<td width="20%" bgcolor="#e0f0f0" >
				<b> <xsl:value-of select="GROUP_NAME" /> </b>
			</td>

			<td width="15%" bgcolor="#f0e0f0"> Initialize Function? </td>
			<td width="5%" bgcolor="#e0f0f0">
				<xsl:value-of select="INITIALIZE_VALUE" />
			</td>

			<td width="15%" bgcolor="#f0e0f0"> Cleanup Function? </td>
			<td width="5%" bgcolor="#e0f0f0">
				<xsl:value-of select="CLEANUP_VALUE" />
			</td>

			<td width="10%" bgcolor="#f0e0f0"> Test Count </td>
			<td width="5%" bgcolor="#e0f0f0">
				<xsl:value-of select="TEST_COUNT_VALUE" />
			</td>
		</tr>
	</xsl:template>

129
	<xsl:template match="BCUNIT_ALL_TEST_LISTING_GROUP_TESTS">
130 131 132 133 134 135 136 137 138 139 140 141 142
		<tr>
			<td align="center" bgcolor="#e0f0d0"> Test Cases </td>
			<td align="left" colspan="7" bgcolor="#e0e0d0">
				<xsl:for-each select="TEST_CASE_NAME">
					<xsl:apply-templates/> <br />
				</xsl:for-each>
			</td>
		</tr>
		<tr bgcolor="#00ccff">
			<td colspan="8"> </td>
		</tr>
	</xsl:template>

143
	<xsl:template match="BCUNIT_FOOTER">
144 145
		<p/>
		<hr align="center" width="90%" color="maroon" />
146
		<h5 align="center">
147 148 149 150
			<xsl:apply-templates/>
		</h5>
	</xsl:template>

151
</xsl:stylesheet>