10000 Unit tests have been fixed by bsekachev · Pull Request #249 · cvat-ai/cvat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unit tests have been fixed #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions cvat/apps/engine/static/engine/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/* exported
ExportType
IncrementIdGenerator
ConstIdGenerator
confirm
createExportContainer
dumpAnnotationRequest
Expand Down Expand Up @@ -245,30 +243,6 @@ function getExportTargetContainer(export_type, shape_type, container) {
return shape_container_target;
}

class IncrementIdGenerator {
constructor(startId=0) {
this._startId = startId;
}

next() {
return this._startId++;
}

reset(startId=0) {
this._startId = startId;
}
}

class ConstIdGenerator {
constructor(startId=-1) {
this._startId = startId;
}

next() {
return this._startId;
}
}

/* These HTTP methods do not require CSRF protection */
function csrfSafeMethod(method) {
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
Expand Down
36 changes: 36 additions & 0 deletions cvat/apps/engine/static/engine/js/idGenerator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*/

/* exported
IncrementIdGenerator
ConstIdGenerator
*/

"use strict";

class IncrementIdGenerator {
constructor(startId=0) {
this._startId = startId;
}

next() {
return this._startId++;
}

reset(startId=0) {
this._startId = startId;
}
}

class ConstIdGenerator {
constructor(startId=-1) {
this._startId = startId;
}

next() {
return this._startId;
}
}
Loading
0