Skip to content

Commit 264a7e7

Browse files
committed
fix cpplint issues
1 parent b530586 commit 264a7e7

7 files changed

Lines changed: 46 additions & 45 deletions

test/unit/math/rev/core/precomputed_gradients_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ TEST_F(AgradRev, StanAgradRevInternal_precomputed_gradients_containers) {
132132
}
133133

134134
TEST_F(AgradRev,
135-
StanAgradRevInternal_precomputed_gradients_containers_direct_construction) {
135+
precomputed_gradients_containers_direct_construction) {
136136
double value = 1;
137137
std::vector<stan::math::var> vars;
138138
std::vector<double> gradients;

test/unit/math/rev/functor/integrate_1d_impl_test.cpp

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ inline void test_derivatives(const F &f, double a, double b,
237237
}
238238
}
239239

240-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_test_integer_arguments) {
240+
TEST_F(AgradRev, integrate_1d_impl_rev_test_integer_arguments) {
241241
stan::math::var v;
242242
std::vector<stan::math::var> theta = {0.5};
243243
std::vector<double> x_r;
@@ -250,7 +250,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_test_integer_arguments) {
250250
theta, x_r, x_i));
251251
}
252252

253-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_easy) {
253+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_easy) {
254254
// Easy integrals
255255
using stan::math::var;
256256
test_derivatives<double, double, var>(f1{}, 0.2, 0.7, {0.75}, {}, {},
@@ -267,7 +267,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_easy) {
267267
{0.0});
268268
}
269269

270-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_zero_crossing) {
270+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_zero_crossing) {
271271
// Zero crossing integral + test x_r + vars at endpoints
272272
using stan::math::var;
273273
test_derivatives<var, var, var>(f3{}, -1.0, 1.0, {0.5, 1.75, 3.9}, {2.5, 3.0},
@@ -280,7 +280,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_zero_crossing) {
280280

281281
TEST_F(
282282
AgradRev,
283-
StanMath_integrate_1d_impl_rev_TestDerivatives_var_right_endpoint_var_params) {
283+
integrate_1d_impl_rev_TestDerivatives_var_right_endpoint_var_params) {
284284
// Zero crossing integral + test x_r + vars at right endpoint
285285
using stan::math::var;
286286
test_derivatives<double, var, var>(
@@ -292,7 +292,7 @@ TEST_F(
292292

293293
TEST_F(
294294
AgradRev,
295-
StanMath_integrate_1d_impl_rev_TestDerivatives_var_left_endpoint_var_params) {
295+
integrate_1d_impl_rev_TestDerivatives_var_left_endpoint_var_params) {
296296
// Zero crossing integral + test x_r + var at left endpoint
297297
using stan::math::var;
298298
test_derivatives<var, double, var>(
@@ -302,7 +302,7 @@ TEST_F(
302302
{5 * pow(0.5, 1.5), 12 * 1.75 * 1.75, 4.0}, -19.06340613646808, 0.0);
303303
}
304304

305-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_no_param_vars) {
305+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_no_param_vars) {
306306
// No param vars
307307
using stan::math::var;
308308
test_derivatives<var, var, double>(f3{}, -1.0, 1.0, {0.5, 1.75, 3.9},
@@ -313,7 +313,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_no_param_vars) {
313313
}
314314

315315
TEST_F(AgradRev,
316-
StanMath_integrate_1d_impl_rev_TestDerivatives_left_limit_var) {
316+
integrate_1d_impl_rev_TestDerivatives_left_limit_var) {
317317
// No param vars, only left limit var
318318
using stan::math::var;
319319
test_derivatives<var, double, double>(f3{}, -1.0, 1.0, {0.5, 1.75, 3.9},
@@ -324,7 +324,7 @@ TEST_F(AgradRev,
324324
}
325325

326326
TEST_F(AgradRev,
327-
StanMath_integrate_1d_impl_rev_TestDerivatives_right_limit_var) {
327+
integrate_1d_impl_rev_TestDerivatives_right_limit_var) {
328328
// No param vars, only right limit var
329329
using stan::math::var;
330330
test_derivatives<double, var, double>(f3{}, -1.0, 1.0, {0.5, 1.75, 3.9},
@@ -334,15 +334,15 @@ TEST_F(AgradRev,
334334
{}, 0.0, 21.41380852375568);
335335
}
336336

337-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_tricky1) {
337+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_tricky1) {
338338
// Tricky integral from Boost docs + limit at infinity + no gradients
339339
using stan::math::var;
340340
test_derivatives<double, double, var>(f4{}, 0.0,
341341
std::numeric_limits<double>::infinity(),
342342
{}, {}, {}, 1.772453850905516, {});
343343
}
344344

345-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_tricky2) {
345+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_tricky2) {
346346
// Tricky integral from Boost docs + limit at infinity with gradients
347347
using stan::math::var;
348348
test_derivatives<double, double, var>(
@@ -352,15 +352,15 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_tricky2) {
352352
-1.772453850905516 * 0.5 / (2 * pow(0.5 * 3.0, 1.5))});
353353
}
354354

355-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_tricky3) {
355+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_tricky3) {
356356
// Tricky integral from Boost docs
357357
using stan::math::var;
358358
test_derivatives<double, double, var>(
359359
f6{}, 0.0, 1.0, {0.75}, {}, {}, 0.851926727945904, {0.4814066053874294});
360360
}
361361

362362
TEST_F(AgradRev,
363-
StanMath_integrate_1d_impl_rev_TestDerivatives_zero_crossing2) {
363+
integrate_1d_impl_rev_TestDerivatives_zero_crossing2) {
364364
// Zero crossing integral + limit at infinity + var at left limit
365365
using stan::math::var;
366366
test_derivatives<var, double, var>(
@@ -370,7 +370,7 @@ TEST_F(AgradRev,
370370
}
371371

372372
TEST_F(AgradRev,
373-
StanMath_integrate_1d_impl_rev_TestDerivatives_zero_crossing3) {
373+
integrate_1d_impl_rev_TestDerivatives_zero_crossing3) {
374374
// Zero crossing integral + limit at negative infinity + var at right limit
375375
using stan::math::var;
376376
test_derivatives<double, var, var>(
@@ -379,7 +379,7 @@ TEST_F(AgradRev,
379379
std::numeric_limits<double>::quiet_NaN(), 1808.042414456063);
380380
}
381381

382-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_indefinite) {
382+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_indefinite) {
383383
// Both limits at infinity + test x_r/x_i + no gradients
384384
using stan::math::var;
385385
test_derivatives<double, double, var>(
@@ -389,7 +389,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_indefinite) {
389389
}
390390

391391
TEST_F(AgradRev,
392-
StanMath_integrate_1d_impl_rev_TestDerivatives_endpoint_precision) {
392+
integrate_1d_impl_rev_TestDerivatives_endpoint_precision) {
393393
// Various integrals of beta function
394394
using stan::math::var;
395395
test_derivatives<double, double, var>(f11{}, 0.0, 1.0, {0.1, 0.1}, {}, {},
@@ -409,7 +409,7 @@ TEST_F(AgradRev,
409409
{-0.01040816326530613, -0.004852607709750566});
410410
}
411411

412-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_gaussian) {
412+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDerivatives_gaussian) {
413413
// Check Gaussian integrates to 1.0 always
414414
using stan::math::var;
415415
test_derivatives<double, double, var>(
@@ -419,7 +419,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDerivatives_gaussian) {
419419
}
420420

421421
TEST_F(AgradRev,
422-
StanMath_integrate_1d_impl_rev_TestDerivativesSameVarAtEndpointAndInParams) {
422+
integrate_1d_impl_rev_TestDerivativesSameVarAtEndpointAndInParams) {
423423
using stan::math::var;
424424

425425
var a = 2.0;
@@ -437,7 +437,7 @@ TEST_F(AgradRev,
437437
EXPECT_LT(std::abs(12.0 - b.adj()), 1e-8);
438438
}
439439

440-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestBeta) {
440+
TEST_F(AgradRev, integrate_1d_impl_rev_TestBeta) {
441441
using stan::math::exp;
442442
using stan::math::integrate_1d_impl;
443443
using stan::math::var;
@@ -461,7 +461,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestBeta) {
461461
EXPECT_FLOAT_EQ(1, 1 + g[1]);
462462
}
463463

464-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestCauchy) {
464+
TEST_F(AgradRev, integrate_1d_impl_rev_TestCauchy) {
465465
using stan::math::exp;
466466
using stan::math::integrate_1d_impl;
467467
using stan::math::var;
@@ -487,7 +487,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestCauchy) {
487487
EXPECT_FLOAT_EQ(1, 1 + g[1]);
488488
}
489489

490-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestChiSquare) {
490+
TEST_F(AgradRev, integrate_1d_impl_rev_TestChiSquare) {
491491
using stan::math::exp;
492492
using stan::math::integrate_1d_impl;
493493
using stan::math::var;
@@ -510,7 +510,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestChiSquare) {
510510
EXPECT_FLOAT_EQ(1, 1 + g[0]);
511511
}
512512

513-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDoubleExponential) {
513+
TEST_F(AgradRev, integrate_1d_impl_rev_TestDoubleExponential) {
514514
using stan::math::exp;
515515
using stan::math::integrate_1d;
516516
using stan::math::var;
@@ -538,7 +538,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestDoubleExponential) {
538538
EXPECT_FLOAT_EQ(1, 1 + g[1]);
539539
}
540540

541-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestExponential) {
541+
TEST_F(AgradRev, integrate_1d_impl_rev_TestExponential) {
542542
using stan::math::exp;
543543
using stan::math::integrate_1d_impl;
544544
using stan::math::var;
@@ -561,7 +561,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestExponential) {
561561
EXPECT_FLOAT_EQ(1, 1 + g[0]);
562562
}
563563

564-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestFrechet) {
564+
TEST_F(AgradRev, integrate_1d_impl_rev_TestFrechet) {
565565
using stan::math::exp;
566566
using stan::math::integrate_1d_impl;
567567
using stan::math::var;
@@ -587,7 +587,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestFrechet) {
587587
EXPECT_FLOAT_EQ(1, 1 + g[1]);
588588
}
589589

590-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestGamma) {
590+
TEST_F(AgradRev, integrate_1d_impl_rev_TestGamma) {
591591
using stan::math::exp;
592592
using stan::math::integrate_1d_impl;
593593
using stan::math::var;
@@ -613,7 +613,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestGamma) {
613613
EXPECT_FLOAT_EQ(1, 1 + g[1]);
614614
}
615615

616-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestGumbel) {
616+
TEST_F(AgradRev, integrate_1d_impl_rev_TestGumbel) {
617617
using stan::math::exp;
618618
using stan::math::integrate_1d_impl;
619619
using stan::math::var;
@@ -639,7 +639,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestGumbel) {
639639
EXPECT_FLOAT_EQ(1, 1 + g[1]);
640640
}
641641

642-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestInvChiSquared) {
642+
TEST_F(AgradRev, integrate_1d_impl_rev_TestInvChiSquared) {
643643
using stan::math::exp;
644644
using stan::math::integrate_1d_impl;
645645
using stan::math::var;
@@ -663,7 +663,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestInvChiSquared) {
663663
EXPECT_FLOAT_EQ(1, 1 + g[0]);
664664
}
665665

666-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestLogistic) {
666+
TEST_F(AgradRev, integrate_1d_impl_rev_TestLogistic) {
667667
using stan::math::exp;
668668
using stan::math::integrate_1d_impl;
669669
using stan::math::var;
@@ -689,7 +689,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestLogistic) {
689689
EXPECT_FLOAT_EQ(1, 1 + g[1]);
690690
}
691691

692-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestLogNormal) {
692+
TEST_F(AgradRev, integrate_1d_impl_rev_TestLogNormal) {
693693
using stan::math::exp;
694694
using stan::math::integrate_1d_impl;
695695
using stan::math::var;
@@ -715,7 +715,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestLogNormal) {
715715
EXPECT_FLOAT_EQ(1, 1 + g[1]);
716716
}
717717

718-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestNormal) {
718+
TEST_F(AgradRev, integrate_1d_impl_rev_TestNormal) {
719719
using stan::math::exp;
720720
using stan::math::integrate_1d_impl;
721721
using stan::math::var;
@@ -741,7 +741,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestNormal) {
741741
EXPECT_FLOAT_EQ(1, 1 + g[1]);
742742
}
743743

744-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestPareto) {
744+
TEST_F(AgradRev, integrate_1d_impl_rev_TestPareto) {
745745
using stan::math::exp;
746746
using stan::math::integrate_1d_impl;
747747
using stan::math::var;
@@ -767,7 +767,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestPareto) {
767767
EXPECT_FLOAT_EQ(1, 1 + g[1]);
768768
}
769769

770-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestPareto2) {
770+
TEST_F(AgradRev, integrate_1d_impl_rev_TestPareto2) {
771771
using stan::math::exp;
772772
using stan::math::integrate_1d_impl;
773773
using stan::math::var;
@@ -795,7 +795,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestPareto2) {
795795
EXPECT_FLOAT_EQ(1, 1 + g[2]);
796796
}
797797

798-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestRayleigh) {
798+
TEST_F(AgradRev, integrate_1d_impl_rev_TestRayleigh) {
799799
using stan::math::exp;
800800
using stan::math::integrate_1d_impl;
801801
using stan::math::var;
@@ -818,7 +818,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestRayleigh) {
818818
EXPECT_FLOAT_EQ(1, 1 + g[0]);
819819
}
820820

821-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestScaledInvChiSquare) {
821+
TEST_F(AgradRev, integrate_1d_impl_rev_TestScaledInvChiSquare) {
822822
using stan::math::exp;
823823
using stan::math::integrate_1d_impl;
824824
using stan::math::var;
@@ -844,7 +844,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestScaledInvChiSquare) {
844844
EXPECT_FLOAT_EQ(1, 1 + g[1]);
845845
}
846846

847-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestStudentT) {
847+
TEST_F(AgradRev, integrate_1d_impl_rev_TestStudentT) {
848848
using stan::math::exp;
849849
using stan::math::integrate_1d_impl;
850850
using stan::math::var;
@@ -872,7 +872,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestStudentT) {
872872
EXPECT_FLOAT_EQ(1, 1 + g[2]);
873873
}
874874

875-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestUniform) {
875+
TEST_F(AgradRev, integrate_1d_impl_rev_TestUniform) {
876876
using stan::math::exp;
877877
using stan::math::integrate_1d_impl;
878878
using stan::math::var;
@@ -896,7 +896,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestUniform) {
896896
EXPECT_FLOAT_EQ(1, 1 + g[1]);
897897
}
898898

899-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestVonMises) {
899+
TEST_F(AgradRev, integrate_1d_impl_rev_TestVonMises) {
900900
using stan::math::exp;
901901
using stan::math::integrate_1d_impl;
902902
using stan::math::var;
@@ -922,7 +922,7 @@ TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestVonMises) {
922922
EXPECT_FLOAT_EQ(1, 1 + g[1]);
923923
}
924924

925-
TEST_F(AgradRev, StanMath_integrate_1d_impl_rev_TestWeibull) {
925+
TEST_F(AgradRev, integrate_1d_impl_rev_TestWeibull) {
926926
using stan::math::exp;
927927
using stan::math::integrate_1d_impl;
928928
using stan::math::var;

test/unit/math/rev/prob/categorical_logit_glm_lpmf_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ categorical_logit_glm_simple_lpmf(const std::vector<int>& y, const T_x& x,
3232

3333
TEST_F(
3434
AgradRev,
35-
ProbDistributionsCategoricalLogitGLM_glm_matches_categorical_logit_doubles) {
35+
CategoricalLogitGLM_glm_matches_categorical_logit_doubles) {
3636
using Eigen::Dynamic;
3737
using Eigen::Matrix;
3838
using Eigen::MatrixXd;

test/unit/math/rev/prob/neg_binomial_2_log_glm_lpmf_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// from existing primitives.
1010
TEST_F(
1111
AgradRev,
12-
ProbDistributionsNegBinomial2LogGLM_glm_matches_neg_binomial_2_log_doubles) {
12+
NegBinomial2LogGLM_glm_matches_neg_binomial_2_log_doubles) {
1313
using Eigen::Dynamic;
1414
using Eigen::Matrix;
1515
using stan::math::var;
@@ -35,7 +35,7 @@ TEST_F(
3535
// from existing primitives.
3636
TEST_F(
3737
AgradRev,
38-
ProbDistributionsNegBinomial2LogGLM_glm_matches_neg_binomial_2_log_doubles_rand) {
38+
NegBinomial2LogGLM_glm_matches_neg_binomial_2_log_doubles_rand) {
3939
using Eigen::Dynamic;
4040
using Eigen::Matrix;
4141
using stan::math::var;
@@ -545,7 +545,7 @@ TYPED_TEST(ProbDistributionsNegBinomial2LogGLM,
545545
// We check that the right errors are thrown.
546546
TEST_F(
547547
AgradRev,
548-
ProbDistributionsNegBinomial2LogGLM_glm_matches_neg_binomial_2_log_error_checking) {
548+
NegBinomial2LogGLM_glm_matches_neg_binomial_2_log_error_checking) {
549549
using Eigen::Dynamic;
550550
using Eigen::Matrix;
551551
using stan::math::var;

test/unit/math/rev/prob/ordered_logistic_glm_lpmf_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ordered_logistic_glm_simple_lpmf(const std::vector<int>& y, T_x&& x,
1616

1717
TEST_F(
1818
AgradRev,
19-
ProbDistributionsOrderedLogisticGLM_glm_matches_ordered_logistic_doubles) {
19+
OrderedLogisticGLM_glm_matches_ordered_logistic_doubles) {
2020
using Eigen::MatrixXd;
2121
using Eigen::VectorXd;
2222
using std::vector;
@@ -36,7 +36,7 @@ TEST_F(
3636

3737
TEST_F(
3838
AgradRev,
39-
ProbDistributionsOrderedLogisticGLM_glm_matches_ordered_logistic_doubles_broadcast_y) {
39+
OrderedLogisticGLM_glm_matches_ordered_logistic_doubles_broadcast_y) {
4040
using Eigen::MatrixXd;
4141
using Eigen::VectorXd;
4242
using std::vector;

0 commit comments

Comments
 (0)