mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Move some tests that do not involve templates out of AST2TemplateTests
Change-Id: Icc6bc9be16d482094792d8903e3bf13511095796 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/25938 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
17bf8f55f1
commit
1ae15f57fa
2 changed files with 31 additions and 31 deletions
|
@ -10632,4 +10632,35 @@ public class AST2CPPTests extends AST2TestBase {
|
||||||
public void testParenthesizedReferenceArgument_424898() throws Exception {
|
public void testParenthesizedReferenceArgument_424898() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// constexpr int naive_fibonacci(int x) {
|
||||||
|
// return x == 0 ? 0
|
||||||
|
// : x == 1 ? 1
|
||||||
|
// : naive_fibonacci(x - 2) + naive_fibonacci(x - 1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// constexpr int waldo = naive_fibonacci(5);
|
||||||
|
public void testConditionalExpressionFolding_429891() throws Exception {
|
||||||
|
BindingAssertionHelper helper = getAssertionHelper();
|
||||||
|
IVariable waldo = helper.assertNonProblem("waldo");
|
||||||
|
assertEquals(5, waldo.getInitialValue().numericalValue().longValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// constexpr int naive_fibonacci(int x) {
|
||||||
|
// return x == 0 ? 0
|
||||||
|
// : x == 1 ? 1
|
||||||
|
// : naive_fibonacci(x - 2) + naive_fibonacci(x - 1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// constexpr int waldo = naive_fibonacci(50);
|
||||||
|
public void testConstexprEvaluationLimit_429891() throws Exception {
|
||||||
|
// Here we're just checking that the computation of the initial
|
||||||
|
// value finishes (with a null result) in a reasonable time.
|
||||||
|
// If we tried to run the computation of naive_fibonacci(50)
|
||||||
|
// to its end, the IDE would appear to hang.
|
||||||
|
BindingAssertionHelper helper = getAssertionHelper();
|
||||||
|
IVariable waldo = helper.assertNonProblem("waldo");
|
||||||
|
assertNull(waldo.getInitialValue().numericalValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8477,35 +8477,4 @@ public class AST2TemplateTests extends AST2TestBase {
|
||||||
public void testConstexprFunctionCallWithNonConstexprArguments_429891() throws Exception {
|
public void testConstexprFunctionCallWithNonConstexprArguments_429891() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
// constexpr int naive_fibonacci(int x) {
|
|
||||||
// return x == 0 ? 0
|
|
||||||
// : x == 1 ? 1
|
|
||||||
// : naive_fibonacci(x - 2) + naive_fibonacci(x - 1);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// constexpr int waldo = naive_fibonacci(5);
|
|
||||||
public void testConditionalExpressionFolding_429891() throws Exception {
|
|
||||||
BindingAssertionHelper helper = getAssertionHelper();
|
|
||||||
IVariable waldo = helper.assertNonProblem("waldo");
|
|
||||||
assertEquals(5, waldo.getInitialValue().numericalValue().longValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// constexpr int naive_fibonacci(int x) {
|
|
||||||
// return x == 0 ? 0
|
|
||||||
// : x == 1 ? 1
|
|
||||||
// : naive_fibonacci(x - 2) + naive_fibonacci(x - 1);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// constexpr int waldo = naive_fibonacci(50);
|
|
||||||
public void testConstexprEvaluationLimit_429891() throws Exception {
|
|
||||||
// Here we're just checking that the computation of the initial
|
|
||||||
// value finishes (with a null result) in a reasonable time.
|
|
||||||
// If we tried to run the computation of naive_fibonacci(50)
|
|
||||||
// to its end, the IDE would appear to hang.
|
|
||||||
BindingAssertionHelper helper = getAssertionHelper();
|
|
||||||
IVariable waldo = helper.assertNonProblem("waldo");
|
|
||||||
assertNull(waldo.getInitialValue().numericalValue());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue