[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: |
Sat, 28 Jan 2017 09:10:14 +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 764db86 236/316: (cit-remove-add-to-project-cpp): Wait for make to finish., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 764db86 236/316: (cit-remove-add-to-project-cpp): Wait for make to finish., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests b804ecf 166/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 11d45fa 170/316: Restructure and improve output, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a93bc4a 292/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ce2952b 312/316: Revert rev. 6995, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a78c71f 255/316: Fix documentation, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 41c7498 284/316: Better skip message, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 32b1d6c 260/316: First pass of creating a distribution., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9679584 296/316: Remove compatibility function `cedet-called-interactively-p'., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests f8e3bbc 311/316: Return fully qualified types if necessary., Edward John Steere, 2017/01/28
- [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/28
- [Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.srt: New file, contents from cpp.srt, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 75c52c3 055/316: (ms_structs, fun): New test example from Marting Stein., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dbfb320 057/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d8b5630 060/316: Patch from Marcus Harnisch, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests dbed2db 058/316: Run the tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests d58e8d8 063/316: Reverse the exist status of Emacs., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh: Add support for running in batch mode., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 66b117d 071/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/28