LCOV - code coverage report
Current view: top level - algs/AdvFront - AF2RuleNewTriangle.cpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 11 14 78.6 %
Date: 2020-07-01 15:24:36 Functions: 3 3 100.0 %
Branches: 1 8 12.5 %

           Branch data     Line data    Source code
       1                 :            : #include "meshkit/AF2RuleNewTriangle.hpp"
       2                 :            : 
       3                 :            : // MeshKit
       4                 :            : #include "meshkit/Error.hpp"
       5                 :            : 
       6                 :        390 : AF2RuleNewTriangle::AF2RuleNewTriangle(
       7                 :        390 :     unsigned int firstIndex, unsigned int secondIndex, unsigned int thirdIndex)
       8                 :            : {
       9                 :        390 :   triVtxIndices[0] = firstIndex;
      10                 :        390 :   triVtxIndices[1] = secondIndex;
      11                 :        390 :   triVtxIndices[2] = thirdIndex;
      12                 :        390 : }
      13                 :            : 
      14                 :      44252 : unsigned int AF2RuleNewTriangle::getNumVertices() const
      15                 :            : {
      16                 :      44252 :   return 3u;
      17                 :            : }
      18                 :            : 
      19                 :      33189 : unsigned int AF2RuleNewTriangle::getVertexIndex(unsigned int vtxNum) const
      20                 :            : {
      21         [ -  + ]:      33189 :   if (vtxNum > 2)
      22                 :            :   {
      23         [ #  # ]:          0 :     MeshKit::Error badArg(MeshKit::MK_BAD_INPUT);
      24                 :            :     badArg.set_string(
      25         [ #  # ]:          0 :         "AF2RuleNewTriangle vertex number must not be greater than 2.");
      26         [ #  # ]:          0 :     throw badArg;
      27                 :            :   }
      28                 :      33189 :   return triVtxIndices[vtxNum];
      29                 :            : }

Generated by: LCOV version 1.11