[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 0041d52 314/316: Add header comm
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 0041d52 314/316: Add header comments and provide. |
Date: |
Fri, 27 Jan 2017 20:03:50 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 0041d522cf1021bc070c79b899048e8bebda8b0f
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Add header comments and provide.
---
test/manual/cedet/inversion-utest.el | 84 ++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/test/manual/cedet/inversion-utest.el
b/test/manual/cedet/inversion-utest.el
new file mode 100644
index 0000000..330313e
--- /dev/null
+++ b/test/manual/cedet/inversion-utest.el
@@ -0,0 +1,84 @@
+;;; inversion-utest.el --- Unit tests for Inversion.
+;;
+;; Copyright (C) 2011 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <address@hidden>
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see http://www.gnu.org/licenses/.
+
+;;; Commentary:
+;;
+
+(require 'inversion)
+
+(defun inversion-unit-test ()
+ "Test inversion to make sure it can identify different version strings."
+ (interactive)
+ (let ((c1 (inversion-package-version 'inversion))
+ (c1i (inversion-package-incompatibility-version 'inversion))
+ (c2 (inversion-decode-version "1.3alpha2"))
+ (c3 (inversion-decode-version "1.3beta4"))
+ (c4 (inversion-decode-version "1.3 beta5"))
+ (c5 (inversion-decode-version "1.3.4"))
+ (c6 (inversion-decode-version "2.3alpha"))
+ (c7 (inversion-decode-version "1.3"))
+ (c8 (inversion-decode-version "1.3pre1"))
+ (c9 (inversion-decode-version "2.4 (patch 2)"))
+ (c10 (inversion-decode-version "2.4 (patch 3)"))
+ (c11 (inversion-decode-version "2.4.2.1"))
+ (c12 (inversion-decode-version "2.4.2.2"))
+ )
+ (if (not (and
+ (inversion-= c1 c1)
+ (inversion-< c1i c1)
+ (inversion-< c2 c3)
+ (inversion-< c3 c4)
+ (inversion-< c4 c5)
+ (inversion-< c5 c6)
+ (inversion-< c2 c4)
+ (inversion-< c2 c5)
+ (inversion-< c2 c6)
+ (inversion-< c3 c5)
+ (inversion-< c3 c6)
+ (inversion-< c7 c6)
+ (inversion-< c4 c7)
+ (inversion-< c2 c7)
+ (inversion-< c8 c6)
+ (inversion-< c8 c7)
+ (inversion-< c4 c8)
+ (inversion-< c2 c8)
+ (inversion-< c9 c10)
+ (inversion-< c10 c11)
+ (inversion-< c11 c12)
+ ;; Negatives
+ (not (inversion-< c3 c2))
+ (not (inversion-< c4 c3))
+ (not (inversion-< c5 c4))
+ (not (inversion-< c6 c5))
+ (not (inversion-< c7 c2))
+ (not (inversion-< c7 c8))
+ (not (inversion-< c12 c11))
+ ;; Test the tester on inversion
+ (not (inversion-test 'inversion inversion-version))
+ ;; Test that we throw an error
+ (inversion-test 'inversion "0.0.0")
+ (inversion-test 'inversion "1000.0")
+ ))
+ (error "Inversion tests failed")
+ (message "Inversion tests passed."))))
+
+
+(provide 'inversion-utest)
+
+;;; inversion.el ends here
- [Emacs-diffs] scratch/merge-cedet-tests a25699b 222/316: semantic/bovine/c: Parse C++ override/final correctly, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests a25699b 222/316: semantic/bovine/c: Parse C++ override/final correctly, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2448a55 268/316: Fix unit testing for several tests and do better error checking., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 40f1fa1 163/316: Synchronize base 'cedet' with Emacs, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e54714f 227/316: Add header comments and provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dfddc2d 262/316: (cit-make-dist): Use cit-check-compilation-for-error., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6d5a631 277/316: Add header comments and provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9b917c5 152/316: Major test restructure, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.srt: New file, contents from cpp.srt, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ecb61db 211/316: New test files combining macros and EDE, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e4d6b74 280/316: Use new create functions for db tools, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0041d52 314/316: Add header comments and provide.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 0141378 247/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ede9f83 214/316: Simplify alias referencing and add tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests da4dd24 253/316: New test for testing ede/cpp-root projects., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests b0da906 144/316: New unit test for EDE project detection., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ef840da 159/316: compdb: add project detection tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests fba6409 297/316: Add test for parsing local variables, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 658ff90 205/316: (cedet-utest): Add EDE sanity check to the end., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 99ad7b6 206/316: Added security test, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 8989dc6 313/316: New Tests for ede-java-root-project type., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e145e4d 088/316: ("Lisp"): Add cit-cpp, cit-el, cit-texi, cit-load, Edward John Steere, 2017/01/27