/external/nanopb-c/tests/basic_buffer/ |
decode_buffer.c | 1 /* A very simple decoding test case, using person.proto. 11 #include "person.pb.h" 19 Person person; local 21 if (!pb_decode(stream, Person_fields, &person)) 26 printf("name: \"%s\"\n", person.name); 27 printf("id: %ld\n", (long)person.id); 29 if (person.has_email) 30 printf("email: \"%s\"\n", person.email); 32 for (i = 0; i < person.phone_count; i++ [all...] |
encode_buffer.c | 1 /* A very simple encoding test case using person.proto. 8 #include "person.pb.h" 17 Person person = {"Test Person 99", 99, true, "test@person.com", local 26 if (pb_encode(&stream, Person_fields, &person))
|
/external/python/cpython2/Doc/includes/sqlite3/ |
insert_more_people.py | 12 for person in newPeople: 13 cur.execute("insert into people (name_last, age) values (?, ?)", person)
|
/external/protobuf/examples/ |
list_people.py | 10 for person in address_book.people: 11 print "Person ID:", person.id 12 print " Name:", person.name 13 if person.email != "": 14 print " E-mail address:", person.email 16 for phone_number in person.phones: 17 if phone_number.type == addressbook_pb2.Person.MOBILE: 19 elif phone_number.type == addressbook_pb2.Person.HOME: 21 elif phone_number.type == addressbook_pb2.Person.WORK [all...] |
add_person.py | 8 # This function fills in a Person message based on user input. 9 def PromptForAddress(person): 10 person.id = int(raw_input("Enter person ID number: ")) 11 person.name = raw_input("Enter name: ") 15 person.email = email 22 phone_number = person.phones.add() 27 phone_number.type = addressbook_pb2.Person.MOBILE 29 phone_number.type = addressbook_pb2.Person.HOME 31 phone_number.type = addressbook_pb2.Person.WOR [all...] |
list_people.cc | 12 const tutorial::Person& person = address_book.people(i); local 14 cout << "Person ID: " << person.id() << endl; 15 cout << " Name: " << person.name() << endl; 16 if (person.email() != "") { 17 cout << " E-mail address: " << person.email() << endl; 20 for (int j = 0; j < person.phones_size(); j++) { 21 const tutorial::Person::PhoneNumber& phone_number = person.phones(j) [all...] |
ListPeople.java | 4 import com.example.tutorial.AddressBookProtos.Person; 12 for (Person person: addressBook.getPeopleList()) { 13 System.out.println("Person ID: " + person.getId()); 14 System.out.println(" Name: " + person.getName()); 15 if (!person.getEmail().isEmpty()) { 16 System.out.println(" E-mail address: " + person.getEmail()); 19 for (Person.PhoneNumber phoneNumber : person.getPhonesList()) [all...] |
add_person.cc | 9 // This function fills in a Person message based on user input. 10 void PromptForAddress(tutorial::Person* person) { 11 cout << "Enter person ID number: "; 14 person->set_id(id); 18 getline(cin, *person->mutable_name()); 24 person->set_email(email); 35 tutorial::Person::PhoneNumber* phone_number = person->add_phones(); 42 phone_number->set_type(tutorial::Person::MOBILE) [all...] |
AddPerson.java | 4 import com.example.tutorial.AddressBookProtos.Person; 14 // This function fills in a Person message based on user input. 15 static Person PromptForAddress(BufferedReader stdin, 17 Person.Builder person = Person.newBuilder(); local 19 stdout.print("Enter person ID: "); 20 person.setId(Integer.valueOf(stdin.readLine())); 23 person.setName(stdin.readLine()); 28 person.setEmail(email) [all...] |
/external/junit-params/src/test/java/junitparams/ |
EnumsAsParamsTest.java | 15 public void passEnumAsString(PersonType person) { 16 assertThat(person).isIn(PersonType.SOME_VALUE, PersonType.OTHER_VALUE); 21 public void passEnumFromMethod(PersonType person) { 22 assertThat(person).isIn(parametersForPassEnumFromMethod());
|
CastingParamsTest.java | 17 public void wrapWithTypeBySingleArgConstructor(PersonTest.Person person) { 18 assertThat(person.getAge()).isGreaterThan(0); 26 public void wrapWithTypeByMultiArgConstructor(PersonTest.Person person) { 27 assertThat(person.getAge()).isGreaterThan(0); 35 public void cartoonCharacters(PersonTest.Person character) {
|
FileParamsTest.java | 9 import junitparams.usage.person_example.PersonTest.Person; 26 public void loadParamsFromFileWithCustomMapper(Person person) { 27 assertThat(person.getAge()).isGreaterThan(0);
|
/external/nanopb-c/tests/basic_stream/ |
decode_stream.c | 6 #include "person.pb.h" 15 Person person; local 17 if (!pb_decode(stream, Person_fields, &person)) 22 printf("name: \"%s\"\n", person.name); 23 printf("id: %ld\n", (long)person.id); 25 if (person.has_email) 26 printf("email: \"%s\"\n", person.email); 28 for (i = 0; i < person.phone_count; i++) 30 Person_PhoneNumber *phone = &person.phone[i] [all...] |
encode_stream.c | 6 #include "person.pb.h" 19 Person person = {"Test Person 99", 99, true, "test@person.com", local 31 if (pb_encode(&stream, Person_fields, &person))
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
DeepStubbingTest.java | 27 static class Person { 207 Person person = mock(Person.class, RETURNS_DEEP_STUBS); field in class:DeepStubbingTest 212 given(person.getAddress().getStreet().getName()).willReturn("Norymberska"); 215 String street = person.getAddress().getStreet().getName(); 224 person.getAddress().getStreet().getName(); 227 verify(person.getAddress().getStreet()).getName(); 233 person.getAddress("111 Mock Lane").getStreet(); 234 person.getAddress("111 Mock Lane").getStreet(Locale.ITALIAN).getName() [all...] |
CloningParameterTest.java | 29 verify(emailSender).sendEmail(1, new Person("Wes")); 33 Person person = new Person("Wes"); local 34 emailSender.sendEmail(1, person); 35 person.emailSent(); 43 when(emailSender.getAllEmails(new Person("Wes"))).thenAnswer(new ClonesArguments()); 46 List<?> emails = emailSender.getAllEmails(new Person("Wes")); 52 public class Person { 57 public Person(String name) [all...] |
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/constructor/ |
ConstructorTest.java | 48 String data = "--- !!org.yaml.snakeyaml.constructor.Person\nfirstName: Andrey\nage: 99"; 51 assertTrue("Unexpected: " + obj.getClass().toString(), obj instanceof Person); 52 Person person = (Person) obj; local 53 assertEquals("Andrey", person.getFirstName()); 54 assertNull(person.getLastName()); 55 assertEquals(99, person.getAge().intValue()); 62 String data = "--- !!org.yaml.snakeyaml.constructor.Person [ Andrey, Somov, 99 ]"; 65 assertTrue(obj.getClass().toString(), obj instanceof Person); 66 Person person = (Person) obj; local 80 Person person = (Person) obj; local [all...] |
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue8/ |
Person.java | 23 public class Person implements Serializable { 29 public Person() { 32 public Person(String firstName, String lastName, int hatSize) { 64 if (object instanceof Person) { 65 Person person = (Person) object; local 66 return firstName.equals(person.firstName) && lastName.equals(person.lastName) 67 && hatSize == person.hatSize [all...] |
PrattleRepresenterTest.java | 29 Person person = new Person("Alan", "Gutierrez", 9); local 30 String etalon = "!!org.yaml.snakeyaml.issues.issue8.Person {firstName: Alan, hatSize: 9, lastName: Gutierrez}\n"; 31 assertEquals(etalon, yaml.dump(person)); 32 assertEquals(etalon, yaml.dump(person)); 39 Person person = new Person("Alan", "Gutierrez", 9); local 40 String etalon = "!!org.yaml.snakeyaml.issues.issue8.Person {firstName: Alan, hatSize: 9, lastName: Gutierrez}\n" [all...] |
/prebuilts/go/darwin-x86/test/fixedbugs/ |
issue13779.go | 12 type person struct{ age, weight, height int } 13 students := map[string]person{"sally": person{12, 50, 32}}
|
/prebuilts/go/linux-x86/test/fixedbugs/ |
issue13779.go | 12 type person struct{ age, weight, height int } 13 students := map[string]person{"sally": person{12, 50, 32}}
|
/external/mockito/src/test/java/org/mockitousage/customization/ |
BDDMockitoTest.java | 328 Person person = mock(Person.class); local 331 person.ride(bike); 332 person.ride(bike); 334 then(person).should(times(2)).ride(bike); 342 Person person = mock(Person.class); local 344 person.drive(car) 356 Person person = mock(Person.class); local [all...] |
/packages/providers/ContactsProvider/tests/assets/testUnsynced/ |
legacy_contacts.sql | 11 CREATE TABLE contact_methods (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES people(_id),kind INTEGER NOT NULL,data TEXT,aux_data TEXT,type INTEGER NOT NULL,label TEXT,isprimary INTEGER NOT NULL DEFAULT 0); 15 CREATE TABLE extensions (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL,value TEXT NOT NULL,person INTEGER REFERENCES people(_id),UNIQUE(person, name)); 24 CREATE TABLE groupmembership (_id INTEGER PRIMARY KEY,person INTEGER REFERENCES people(_id),group_id INTEGER REFERENCES groups(_id),group_sync_account STRING,group_sync_id STRING); 32 CREATE TABLE organizations (_id INTEGER PRIMARY KEY AUTOINCREMENT,company TEXT,title TEXT,isprimary INTEGER NOT NULL DEFAULT 0,type INTEGER NOT NULL,label TEXT,person INTEGER REFERENCES people(_id)); 55 CREATE TABLE phones (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES people(_id),type INTEGER NOT NULL,number TEXT,number_key TEXT,label TEXT,isprimary INTEGER NOT NULL DEFAULT 0); 59 CREATE TABLE photos (_id INTEGER PRIMARY KEY AUTOINCREMENT,exists_on_server INTEGER NOT NULL DEFAULT 0,person INTEGER REFERENCES people(_id), local_version TEXT,data BLOB,sync_error TEXT,_sync_account TEXT,_sync_id TEXT,_sync_time TEXT,_sync_version TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER NOT NULL DEFAULT 0,_sync_mark INTEGER,UNIQUE(person) ); 74 CREATE INDEX contactMethodsPeopleIndex ON contact_methods (person); 75 CREATE INDEX extensionsIndex1 ON extensions (person, name) [all...] |
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue310/ |
PropertyWithPrivateCostructorTest.java | 49 Person loadedPerson = yaml().loadAs(yamlStr, Person.class); 59 Person person = new Person(123, "Neo Anderson", Option.valueOf(123456.78)); local 61 String dump = yaml().dumpAsMap(person); 63 Person loadedPerson = yaml().loadAs(dump, Person.class);
|
/packages/providers/ContactsProvider/tests/assets/test1/ |
legacy_contacts.sql | 14 CREATE TABLE contact_methods (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES people(_id),kind INTEGER NOT NULL,data TEXT,aux_data TEXT,type INTEGER NOT NULL,label TEXT,isprimary INTEGER NOT NULL DEFAULT 0); 31 CREATE TABLE extensions (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL,value TEXT NOT NULL,person INTEGER REFERENCES people(_id),UNIQUE(person, name)); 40 CREATE TABLE groupmembership (_id INTEGER PRIMARY KEY,person INTEGER REFERENCES people(_id),group_id INTEGER REFERENCES groups(_id),group_sync_account STRING,group_sync_id STRING); 51 CREATE TABLE organizations (_id INTEGER PRIMARY KEY AUTOINCREMENT,company TEXT,title TEXT,isprimary INTEGER NOT NULL DEFAULT 0,type INTEGER NOT NULL,label TEXT,person INTEGER REFERENCES people(_id)); 78 CREATE TABLE phones (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES people(_id),type INTEGER NOT NULL,number TEXT,number_key TEXT,label TEXT,isprimary INTEGER NOT NULL DEFAULT 0); 89 CREATE TABLE photos (_id INTEGER PRIMARY KEY AUTOINCREMENT,exists_on_server INTEGER NOT NULL DEFAULT 0,person INTEGER REFERENCES people(_id), local_version TEXT,data BLOB,sync_error TEXT,_sync_account TEXT,_sync_id TEXT,_sync_time TEXT,_sync_version TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER NOT NULL DEFAULT 0,_sync_mark INTEGER,UNIQUE(person) ); 106 CREATE INDEX contactMethodsPeopleIndex ON contact_methods (person); 107 CREATE INDEX extensionsIndex1 ON extensions (person, name) [all...] |