
USING Progress.Lang.*.
USING OpenEdge.Core.Assert.

block-level on error undo, throw.
class tests.preproc.TestNamedArgsWithEmbeddedComment:
    
    @Setup.
    method public void setUp(  ):
        session:suppress-warnings = false no-error.
    end method.

    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment01(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" /* "tuff" */ &name2="2"}
        Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment02(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1"/* "tuff" */ &name2="2"}
        Assert:Equals('1/* ~{name1} 2 ~{name2} 1/* ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1/* 2 ~{*} "&name1="1/*" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment03(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" /* "tuff" */&name2="2"}
        Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment04(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1"/* "tuff" */&name2="2"}
        Assert:Equals('1/* ~{name1} 2 ~{name2} 1/* ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1/* 2 ~{*} "&name1="1/*" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment05(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1"/*"tuff" */&name2="2"}
        Assert:Equals('1/*tuff ~{name1} 2 ~{name2} 1/*tuff ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1/*tuff 2 ~{*} "&name1="1/*tuff" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment06(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1"/*"tuff"*/&name2="2"}
        Assert:Equals('1/*tuff*/&name2=2 ~{name1}  ~{name2} 1/*tuff*/&name2=2 ~{1}  ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1/*tuff*/&name2=2 ~{*} "&name1="1/*tuff*/&name2=2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment07(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" "tuff" &name2="2"}
        Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment08(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" tuff" &name2="2"}
        Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment09(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" "tuff &name2="2"}
        Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @Test.
    METHOD PUBLIC VOID TestNamedArgsWithEmbeddedComment10(  ):  
        def var x as char.
        x = {tests/preproc/support/show_preproc_args.i &name1="1" "&name2="2"}
     Assert:Equals('1 ~{name1} 2 ~{name2} 1 ~{1} 2 ~{2}  ~{3}  ~{4}  ~{5}  ~{6}  ~{7} 1 2 ~{*} "&name1="1" &name2="2"" ~{* (named)}', x).
    END METHOD.
    
    @TearDown.
    method public void tearDown(  ):
        
        return.

    end method.
end class.


