Home
last modified time | relevance | path

Searched refs:t (Results 1 – 25 of 98) sorted by relevance

1234

/development/tools/repo_diff/service/repodiff/interactors/
Drunner.go19 func (t *taskRunner) ExecuteFunctionsAsync(functions []func() error) error {
20 t.Lock()
21 defer t.Unlock()
22 t.errorChan = make(chan error)
23 t.spawnTasksAsync(
24 t.syncErrorFnToAsync(functions),
26 go t.closeErrorChanOnComplete()
27 return t.breakOnError()
30 func (t *taskRunner) breakOnError() error {
31 return <-t.errorChan
[all …]
Dstrings_test.go9 func TestDistinctValues(t *testing.T) {
30 assert.Equal(t, expectedDiff, diff, "Output differential of s1 and s2")
33 func TestDistinctValuesEmpty(t *testing.T) {
38 assert.Equal(t, 0, len(diff), "Output differential of s1 and s2")
41 func TestDistinctValuesDuplicates(t *testing.T) {
52 assert.Equal(t, expectedDiff, diff, "Output differential of s1 and s2")
55 func TestSetSubtract(t *testing.T) {
70 assert.Equal(t, expected, diff, "Discard of s2 from s1")
73 func TestSetUnion(t *testing.T) {
91 assert.Equal(t, expected, union, "Union of s2 and s1")
[all …]
Dlogic_test.go13 func TestExistingErrorOrTT(t *testing.T) {
15 t,
27 func TestExistingErrorOrTF(t *testing.T) {
29 t,
42 func TestExistingErrorOrFT(t *testing.T) {
44 t,
56 func TestExistingErrorOrFF(t *testing.T) {
58 t,
70 func TestAnyErrorPositive(t *testing.T) {
72 t,
[all …]
Drunner_test.go18 func TestExecuteFunctionsAsyncErrExists(t *testing.T) {
26 assert.NotEqual(t, nil, err, "Error should exist")
29 func TestExecuteFunctionsAsyncNoErr(t *testing.T) {
37 assert.Equal(t, nil, err, "Error should not exist")
/development/tools/repo_diff/service/repodiff/repositories/
Dcommit_test.go25 func TestInsertCommitRows(t *testing.T) {
28 assert.Equal(t, 0, getCommitRowCount(), "Rows should start empty")
31 assert.Equal(t, nil, err, "Error should not be nil")
35 assert.Equal(t, nil, err, "Error should be nil")
36 assert.Equal(t, len(fixtures), getCommitRowCount(), "Rows should be inserted")
39 func TestCommitGetMostRecentOuterKey(t *testing.T) {
44 assert.Equal(t, nil, err, "Eroror should be nil")
48 …assert.True(t, ent.RepoTimestamp(timestamp) > oldTimestamp, "Insert timestamp should be greater th…
49 assert.Equal(t, 36, len(uid.String()), "Valid UUID should be generated")
52 func TestGetMostRecentCommits(t *testing.T) {
[all …]
Dsource_test.go27 func TestProtocolStrippedURL(t *testing.T) {
30 assert.Equal(t, expected, protocolStrippedURL(urlWithProtocol), "Protocol should be removed")
33 func TestGetOrCreateURLBranchID(t *testing.T) {
40 assert.Equal(t, nil, err, "Error should be nil")
41 assert.True(t, id > 0, "ID should be non-zero")
44 assert.Equal(t, id, idSecondFetch, "Retrieved ID values should be identical")
47 func TestGetOrCreateURLBranchIDCache(t *testing.T) {
55 assert.Equal(t, int16(1), id, "ID should be 1 since it's first row")
61 assert.Equal(t, int16(1), id, "ID should be 1 since it's first row")
64 assert.Equal(t, int16(1), id, "ID should be 1 since it hit the cache")
[all …]
Ddenormalizer_test.go46 func TestInsertDenormalizedDiffRows(t *testing.T) {
50 assert.Equal(t, 0, getRowCountAtTable(tableName), "Rows should start empty")
53 assert.Equal(t, nil, err, "Error should not be nil")
57 assert.Equal(t, nil, err, "Error should be nil")
58 assert.Equal(t, len(fixtures), getRowCountAtTable(tableName), "Rows should be inserted")
61 func TestDenormalizeToChangesOverTime(t *testing.T) {
68 assert.Equal(t, nil, err, "Error should be nil")
71 func TestDenormalizeToRecentCommits(t *testing.T) {
94 assert.Equal(t, nil, err, "Error should be nil")
95 assert.Equal(t, len(fixtures), getRowCountAtTable(tableName), "Rows should be inserted")
[all …]
Dproject_test.go36 func TestInsertDiffRows(t *testing.T) {
39 assert.Equal(t, 0, getProjectRowCount(), "Rows should start empty")
42 assert.Equal(t, nil, err, "Error should not be nil")
46 assert.Equal(t, len(fixtures), getProjectRowCount(), "Rows should be inserted")
49 func TestGetMostRecentOuterKey(t *testing.T) {
57 assert.True(t, timestamp > oldTimestamp, "Insert timestamp should be greater than old")
58 assert.Equal(t, 36, len(uid.String()), "Valid UUID should be generated")
61 func TestGetMostRecentOuterKeyEmpty(t *testing.T) {
62 assert.Equal(t, 0, getProjectRowCount(), "Database shoudl start empty")
66 assert.NotEqual(t, nil, err, "Error should be returned when database is empty")
[all …]
/development/samples/devbytes/animation/CurvedMotion/src/com/example/android/curvedmotion/
DPathEvaluator.java28 public PathPoint evaluate(float t, PathPoint startValue, PathPoint endValue) { in evaluate() argument
31 float oneMinusT = 1 - t; in evaluate()
33 3 * oneMinusT * oneMinusT * t * endValue.mControl0X + in evaluate()
34 3 * oneMinusT * t * t * endValue.mControl1X + in evaluate()
35 t * t * t * endValue.mX; in evaluate()
37 3 * oneMinusT * oneMinusT * t * endValue.mControl0Y + in evaluate()
38 3 * oneMinusT * t * t * endValue.mControl1Y + in evaluate()
39 t * t * t * endValue.mY; in evaluate()
41 x = startValue.mX + t * (endValue.mX - startValue.mX); in evaluate()
42 y = startValue.mY + t * (endValue.mY - startValue.mY); in evaluate()
/development/tools/repo_diff/service/repodiff/persistence/filesystem/
Dcsv_test.go10 func TestGenerateCSVLines(t *testing.T) {
16 assert.Equal(t, 9, len(columns), "Fixture CSV Column Count")
19 assert.Equal(t, 670, lineCount, "Fixture CSV line count")
20 assert.Equal(t, nil, err, "Read CSV Error output")
23 func TestNonExistentFile(t *testing.T) {
29 assert.NotEqual(t, err, nil, "CSV Error should be generated")
32 func TestWriteCSVToFile(t *testing.T) {
51 assert.Equal(t, err, nil, "Error should not be generated")
57 assert.Equal(t, 2, len(columns), "Initial CSV ColumnCount")
61 assert.Equal(t, nil, err, "No error should exist reading created CSV")
[all …]
Dunix_test.go9 func TestFindFnamesInDirNonZero(t *testing.T) {
11 assert.Equal(t, 1, len(foundFiles), "Number of files found in directory")
14 func TestFindFnamesInDirMultipleArgs(t *testing.T) {
16 assert.Equal(t, 2, len(foundFiles), "Number of files found in directory")
19 func TestFindFnamesInDirZero(t *testing.T) {
21 assert.Equal(t, 0, len(foundFiles), "Number of files found in directory")
24 func TestCSVFileToEntities(t *testing.T) {
31 assert.Equal(t, nil, err, "Error should be nil")
32 assert.Equal(t, 670, len(entities), "Entity length should be equal")
Dxml_test.go11 func TestReadXMLAsEntity(t *testing.T) {
14 assert.Equal(t, nil, err, "Error should be nil")
15 assert.Equal(t, 761, len(manifest.Projects), "Number of loaded projects")
18 func TestReadXMLAsEntityFileDoesNotExist(t *testing.T) {
21 assert.NotEqual(t, nil, err, "Error should be generated")
/development/tools/repo_diff/service/repodiff/mappers/
Dmappers_test.go12 func TestCSVLineToDiffRow(t *testing.T) {
28 assert.Equal(t, nil, err, "Error should be nil")
29 assert.Equal(t, expected, *diffRow, "Entities should be identical")
32 func TestCSVLineToCommitRow(t *testing.T) {
44 assert.Equal(t, nil, err, "Error should be nil")
45 assert.Equal(t, expected, *commitRow, "Entities should be identical")
48 func TestDiffRowsToAggregateChangesOverTime(t *testing.T) {
64 assert.Equal(t, expected, cols, "Columns should be equal")
79 func TestGetAuthorTechAreaUnknown(t *testing.T) {
82 assert.Equal(t, "Unknown", techArea, "Author tech area should be unknown")
[all …]
Dcsv_test.go11 func TestCommitEntityToCSVRow(t *testing.T) {
31 assert.Equal(t, expected, csvRow, "Strings should be equal")
34 func TestCommitEntityToCSVHeader(t *testing.T) {
36 t,
50 func TestCommitEntitiesToCSVRows(t *testing.T) {
68 assert.Equal(t, 2, len(rows), "2 rows should be generated")
/development/samples/BrokenKeyDerivation/src/com/example/android/brokenkeyderivation/
DInsecureSHA1PRNGKeyDerivator.java455 for ( int t = 16; t < 80 ; t++ ) {
457 temp = arrW[t-3] ^ arrW[t-8] ^ arrW[t-14] ^ arrW[t-16];
458 arrW[t] = ( temp<<1 ) | ( temp>>>31 );
461 for ( int t = 0 ; t < 20 ; t++ ) {
465 ( e + arrW[t] + 0x5A827999 ) ;
472 for ( int t = 20 ; t < 40 ; t++ ) {
474 temp = ((( a<<5 ) | ( a>>>27 ))) + (b ^ c ^ d) + (e + arrW[t] + 0x6ED9EBA1) ;
481 for ( int t = 40 ; t < 60 ; t++ ) {
484 (e + arrW[t] + 0x8F1BBCDC) ;
491 for ( int t = 60 ; t < 80 ; t++ ) {
[all …]
/development/scripts/
Dget_rust_pkg.py223 all_base_names = set(map(lambda t: t[0], tuples))
231 map(lambda t: (t[0].difference(external_names), t[1]), new_tuples))
237 first_group = list(filter(lambda t: not t[0], new_tuples))
238 other_group = list(filter(lambda t: t[0], new_tuples))
243 first_group = list(map(lambda t: t[1], first_group))
247 base_names = set(map(lambda t: t[0], first_group))
249 map(lambda t: (t[0].difference(base_names), t[1]), other_group))
256 list(map(lambda t: t[1][1], other_group))))
258 other_group = list(map(lambda t: t[1], other_group))
267 max_length = functools.reduce(lambda a, t: max(a, len(t[0])), found_pkgs, 1)
[all …]
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/logging/
DLogger.java72 public void i(String msg, Throwable t) { in i() argument
73 Log.i(APP_TAG, getMsg(msg), t); in i()
80 public void d(String msg, Throwable t) { in d() argument
81 Log.d(APP_TAG, getMsg(msg), t); in d()
88 public void w(String msg, Throwable t) { in w() argument
89 Log.w(APP_TAG, getMsg(msg), t); in w()
96 public void e(String msg, Throwable t) { in e() argument
97 Log.e(APP_TAG, getMsg(msg), t); in e()
/development/tools/repo_diff/service/repodiff/utils/
Dtime_test.go11 func TestTimestampSeconds(t *testing.T) {
14 assert.True(t, newTimestamp > oldTimestamp, "New timestamp should be greater than fixture")
18 func TestTimestampToDate(t *testing.T) {
20 assert.Equal(t, "2018-02-22", TimestampToDate(timestamp), "Date conversion")
23 func TestTimestampToDataStudioDatetime(t *testing.T) {
25 assert.Equal(t, "2018022210", TimestampToDataStudioDatetime(timestamp), "Datetime conversion")
Dtime.go5 t "time" packageName
11 return ent.RepoTimestamp(t.Now().Unix())
15 year, month, day := t.Unix(int64(timestamp), 0).Date()
21 asTime := t.Unix(int64(timestamp), 0)
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/utils/
DLogHelper.java66 public static void w(String tag, Throwable t, Object... messages) { in w() argument
67 log(tag, Log.WARN, t, messages); in w()
74 public static void e(String tag, Throwable t, Object... messages) { in e() argument
75 log(tag, Log.ERROR, t, messages); in e()
78 public static void log(String tag, int level, Throwable t, Object... messages) { in log() argument
81 if (t == null && messages != null && messages.length == 1) { in log()
89 if (t != null) { in log()
90 sb.append("\n").append(Log.getStackTraceString(t)); in log()
/development/apps/Development/src/com/android/development/
DLogViewer.java68 private void appendThrowable(Throwable t) { in appendThrowable() argument
71 builder.append(Log.getStackTraceString(t)); in appendThrowable()
141 private final Throwable t; field in LogViewer.AppendThrowable
143 public AppendThrowable(Throwable t) { in AppendThrowable() argument
144 this.t = t; in AppendThrowable()
148 appendThrowable(t); in run()
/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DCompressedTextureActivity.java140 for (int t = 0; t < height; t++) { in createImage()
141 byte red = (byte)(255-2*t); in createImage()
142 byte green = (byte)(2*t); in createImage()
145 int y = x ^ t; in createImage()
/development/tools/repo_diff/service/repodiff/constants/
Dconstants_test.go9 func TestNullUUID(t *testing.T) {
11 assert.Equal(t, expected, NullUUID().String(), "Null UUID should be deterministic")
12 assert.Equal(t, NullUUID(), NullUUID(), "Equality verification")
/development/tools/repo_diff/service/repodiff/persistence/sql/
Dsql_test.go9 func TestConnection(t *testing.T) {
11 assert.Equal(t, nil, err, "Database interface error should not be nil")
13 assert.Equal(t, nil, err, "No error should exist pinging the database")
/development/samples/ApiDemos/src/com/example/android/apis/view/
DTextSwitcher1.java74 TextView t = new TextView(this); in makeView() local
75 t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL); in makeView()
76 t.setTextSize(36); in makeView()
77 return t; in makeView()

1234