[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master: tests: style changes
From: |
Akim Demaille |
Subject: |
master: tests: style changes |
Date: |
Thu, 30 Aug 2018 08:15:30 +0200 |
Pushed in master.
commit 15233a37288b7e40b5004bee04ce665ee9f9b926
Author: Akim Demaille <address@hidden>
Date: Sun Aug 26 07:55:45 2018 +0200
tests: style changes
* tests/c++.at (C++ Variant-based Symbols): Rename as...
(C++ Variant-based Symbols Unit Tests): this.
Comment/style changes.
diff --git a/tests/c++.at b/tests/c++.at
index 25f489e8..e00c5ceb 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -88,11 +88,14 @@ AT_BISON_OPTION_POPDEFS
AT_CLEANUP
-## --------------------------- ##
-## C++ Variant-based Symbols. ##
-## --------------------------- ##
+## -------------------------------------- ##
+## C++ Variant-based Symbols Unit Tests. ##
+## -------------------------------------- ##
+
+# Not checking the grammar, only the variants and variant based
+# symbols.
-AT_SETUP([C++ Variant-based Symbols])
+AT_SETUP([C++ Variant-based Symbols Unit Tests])
AT_KEYWORDS([variant])
@@ -115,7 +118,7 @@ AT_DATA_GRAMMAR([list.y],
}
%token <int> INT "int"
-%type < std::vector<int> > exp
+%type <std::vector<int>> exp
%printer { yyo << $$; } <int>
%printer
@@ -126,7 +129,7 @@ AT_DATA_GRAMMAR([list.y],
yyo << ", ";
yyo << *i;
}
- } < std::vector<int> >
+ } <std::vector<int>>
%code requires { #include <vector> }
%code { int yylex (yy::parser::semantic_type* yylval); }
@@ -139,17 +142,20 @@ exp: "int" { $$.push_back ($1); }
int main()
{
+ // symbol_type: construction, accessor.
{
yy::parser::symbol_type s = yy::parser::make_INT(12);
std::cerr << s.value.as<int>() << '\n';
}
+ // stack_symbol_type: construction, accessor.
{
yy::parser::symbol_type s = yy::parser::make_INT(123);
yy::parser::stack_symbol_type ss(1, s);
std::cerr << ss.value.as<int>() << '\n';
}
+ // pushing on the stack.
{
yy::parser::stack_type st;
for (int i = 0; i < 100; ++i)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master: tests: style changes,
Akim Demaille <=