OSDN Git Service

change CoverageReporter/MainForm.cs
[codecoverage/main.git] / CoverageFramework / Operator / Decorator / C / BranchCoverageDecoratorForC.cs
1 using System.Collections.Generic;\r
2 using System.Xml.Linq;\r
3 \r
4 namespace CoverageFramework.Operator.Decorator.C\r
5 {\r
6         public class BranchCoverageDecoratorForC : ITaggedXElementDecorator\r
7         {\r
8                 #region ITaggedXElementDecorator \83\81\83\93\83o\r
9 \r
10                 public XElement[] Generate(IEnumerable<XElement> elements, string tag)\r
11                 {\r
12                         return new[] {\r
13                                 new XElement("postfix_expression",\r
14                                         new XElement("primary_expression",\r
15                                                 new XElement("TOKEN", "branch")),\r
16                                         new XElement("TOKEN", "("),\r
17                                         new XElement("argument_expression_list",\r
18                                                 new XElement("constant",\r
19                                                         new XElement("TOKEN", '"' + tag + '"')),\r
20                                                 new XElement("TOKEN", ","),\r
21                                                 elements),\r
22                                         new XElement("TOKEN", ")")),\r
23                         };\r
24                 }\r
25 \r
26                 #endregion\r
27         }\r
28 }