49 int main(
int argc,
char **argv) {
50 SetFlag(&FST_FLAGS_fst_verify_properties,
true);
53 static const int kCacheGcLimit = 20;
55 LOG(INFO) <<
"Seed = " << FST_FLAGS_seed;
57 std::mt19937_64 rand(FST_FLAGS_seed);
59 SetFlag(&FST_FLAGS_fst_default_cache_gc,
60 std::bernoulli_distribution(.5)(rand));
61 SetFlag(&FST_FLAGS_fst_default_cache_gc_limit,
62 std::uniform_int_distribution<>(0, kCacheGcLimit)(rand));
63 VLOG(1) <<
"default_cache_gc:" << FST_FLAGS_fst_default_cache_gc;
64 VLOG(1) <<
"default_cache_gc_limit:" 65 << FST_FLAGS_fst_default_cache_gc_limit;
66 #if defined(TEST_TROPICAL) 68 #elif defined(TEST_LOG) 70 #elif defined(TEST_MINMAX) 72 #elif defined(TEST_LEFT_STRING) 74 #elif defined(TEST_RIGHT_STRING) 76 #elif defined(TEST_GALLIC) 78 #elif defined(TEST_LEXICOGRAPHIC) 81 using Arc = LexicographicArc<TropicalWeight, TropicalWeight>;
82 #elif defined(TEST_POWER) 86 using Arc = ArcTpl<PowerWeight<TropicalWeight, 3>>;
88 #error "Must have one of the TEST_* macros defined." 90 WeightGenerate<Arc::Weight> weight_generator(FST_FLAGS_seed,
92 AlgoTester<Arc> arc_tester(weight_generator, FST_FLAGS_seed);
DEFINE_int32(repeat, 25,"number of test repetitions")
int main(int argc, char **argv)
ArcTpl< TropicalWeight > StdArc
ArcTpl< MinMaxWeight > MinMaxArc
#define SET_FLAGS(usage, argc, argv, rmflags)
DEFINE_uint64(seed, 403,"random seed")
TropicalWeightTpl< float > TropicalWeight
ArcTpl< LexicographicWeight< Weight1, Weight2 >> LexicographicArc
void SetFlag(Type *flag, Value value)
ArcTpl< LogWeight > LogArc