Class CommentsParserValidator


  • public final class CommentsParserValidator
    extends java.lang.Object
    Comments parse is a very simple yaml parser and to make sure it works correctly comparing parsed structure with snakeyaml parse result (parsed trees are unified to represent equal trees).

    Comments parser and snakeyaml models are unified to get equally trees (easier for comparison).

    During comparison, property values parsed by snakeyaml are assigned in comments tree. This is required for list items matching logic accuracy (otherwise different comments near values could prevent values matching).

    Since:
    18.05.2021
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void validate​(CmtTree comments, StructTree struct)
      Compare that parsed trees are structurally the same to verify comments parser correctness (assuming snakeyaml works perfectly).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • validate

        public static void validate​(CmtTree comments,
                                    StructTree struct)
        Compare that parsed trees are structurally the same to verify comments parser correctness (assuming snakeyaml works perfectly).
        Parameters:
        comments - comments parser result
        struct - snakeyaml result