Searched refs:species (Results 1 - 2 of 2) sorted by relevance

/gem5/ext/pybind11/tests/
H A Dtest_class.py74 assert roger.name() + " is a " + roger.species() == "Rabbit is a parrot"
78 assert polly.name() + " is a " + polly.species() == "Polly is a parrot"
82 assert molly.name() + " is a " + molly.species() == "Molly is a dog"
86 assert fred.name() + " is a " + fred.species() == "Fred is a rodent"
H A Dtest_class.cpp48 Pet(const std::string &name, const std::string &species) argument
49 : m_name(name), m_species(species) {}
51 std::string species() const { return m_species; } function in class:Pet
81 .def("species", &Pet::species);
98 m.def("pet_name_species", [](const Pet &pet) { return pet.name() + " is a " + pet.species(); });

Completed in 7 milliseconds