mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Tests - fixed failing tests
This commit is contained in:
parent
2c4e0155db
commit
b126f6bd06
3 changed files with 34 additions and 35 deletions
|
@ -17,6 +17,8 @@ package ghidra.util;
|
|||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -30,9 +32,11 @@ public class DateUtilsTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFormatDateTime() {
|
||||
Date date = new Date(1572896586687L);
|
||||
assertEquals("Nov 04, 2019 02:43 PM", DateUtils.formatDateTimestamp(date));
|
||||
public void testFormatDateTime() throws ParseException {
|
||||
SimpleDateFormat format = new SimpleDateFormat("MMM dd, yyyy hh:mm a");
|
||||
String dateString = "Nov 04, 2019 02:43 PM";
|
||||
Date date = format.parse(dateString);
|
||||
assertEquals(dateString, DateUtils.formatDateTimestamp(date));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue