mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Compile succeeding syntax tests.
This commit is contained in:
parent
276b275cdc
commit
4a65c5ebaa
@ -83,7 +83,21 @@ TestCase::TestResult SyntaxTest::run(ostream& _stream, string const& _linePrefix
|
||||
OptimiserSettings::minimal()
|
||||
);
|
||||
if (compiler().parse())
|
||||
compiler().analyze();
|
||||
if (compiler().analyze())
|
||||
try
|
||||
{
|
||||
if (!compiler().compile())
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Compilation failed even though analysis was successful."));
|
||||
}
|
||||
catch (UnimplementedFeatureError const& _e)
|
||||
{
|
||||
m_errorList.emplace_back(SyntaxTestError{
|
||||
"UnimplementedFeatureError",
|
||||
errorMessage(_e),
|
||||
-1,
|
||||
-1
|
||||
});
|
||||
}
|
||||
|
||||
for (auto const& currentError: filterErrors(compiler().errors(), true))
|
||||
{
|
||||
|
@ -4,3 +4,5 @@ contract C {
|
||||
fixed a3 = 0 / 0.123;
|
||||
fixed a4 = 0 / -0.123;
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -4,5 +4,6 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (50-67): Unused local variable.
|
||||
// Warning: (20-119): Function state mutability can be restricted to pure
|
||||
|
@ -4,5 +4,6 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (50-73): Unused local variable.
|
||||
// Warning: (20-118): Function state mutability can be restricted to pure
|
||||
|
@ -8,4 +8,5 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (20-147): Function state mutability can be restricted to pure
|
||||
|
@ -6,4 +6,5 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (20-104): Function state mutability can be restricted to pure
|
||||
|
@ -6,4 +6,5 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (20-108): Function state mutability can be restricted to pure
|
||||
|
@ -5,3 +5,5 @@ contract test {
|
||||
a; b;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -7,3 +7,5 @@ contract A {
|
||||
a; b; c; d;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -5,4 +5,5 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (20-104): Function state mutability can be restricted to pure
|
||||
|
@ -6,4 +6,5 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (20-182): Function state mutability can be restricted to pure
|
||||
|
@ -4,3 +4,5 @@ contract test {
|
||||
fixedString[0.5] = "Half";
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -5,3 +5,5 @@ contract test {
|
||||
}
|
||||
myStruct a = myStruct(3.125, 3);
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -11,5 +11,6 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (238-252): This declaration shadows an existing declaration.
|
||||
// Warning: (20-339): Function state mutability can be restricted to pure
|
||||
|
@ -4,5 +4,6 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (50-58): Unused local variable.
|
||||
// Warning: (20-89): Function state mutability can be restricted to pure
|
||||
|
@ -6,6 +6,7 @@ contract A {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
// Warning: (52-60): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (62-74): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
||||
// Warning: (93-104): Unused local variable.
|
||||
|
@ -7,3 +7,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -6,3 +6,5 @@ contract test {
|
||||
a; b; c;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
@ -13,3 +13,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// UnimplementedFeatureError: Not yet implemented - FixedPointType.
|
||||
|
Loading…
Reference in New Issue
Block a user